I noticed that webstorm has an external libraries node in the project explorer. In that I see Node.js 0.6.15 and also an option for Node.js Globals.
Two questions:
Can I have it reference node 0.8?
What is Node.js Globals for?
Are the external libraries used for code completion?
Node.js is configured as a Global Library in WebStorm. If you want to use another version, delete the existing library and follow the documentation to configure the new version, during the configuration process a new global library will be added.
It's used for code completion and stepping in debug mode.
Related
I want to ease adoption of dependency management in my organization, and it does not seem to be as easy of a task with C/C++ as it is with Java.
I want to use an internal Artifactory repository (Maven, Ivy, Gradle or whatever is suitable) to essentially be able to download and publish external libraries which have been precompiled to then statically link them (catch: we are using a custom compiler for an embedded platform)
I have read what it seems to be the basic guide from Gradle's website, however there is no mention of external repositories:
https://docs.gradle.org/current/userguide/native_software.html
http://gradle.monochromeroad.com/docs/userguide/nativeBinaries.html
These two threads seem to touch on the subject, but I'm confused as to where the linking is happening and in what order:
https://discuss.gradle.org/t/external-dependencies-in-cpp-projects/7135
https://discuss.gradle.org/t/right-way-to-copy-contents-from-dependency-archives/7449
So far I cannot wrap my mind around some of the closures/syntax and correct usage of stuff like "configurations", "dependencies", "repositories" because they seem to be used in different ways.
With all that said, what would be a minimal example to get the following done?:
Go to Artifactory
Fetch a dependency (let's assume it is a .a or .o file)
Put that individual dependency in a specific location within the project
Build (specifying the linking order and compiler)
If I write an application using MFC libraries in C++, in deployment stage do I require to install some sort of frameworks or stuff like that?
My intent is to have a standalone exe without complicated installation scripts.
If you're developping a local application for your own organisation, you could go for static linking, as suggested by Danny.
But static linking is not the method recommended by Microsoft: every time there's an MFC related patch (example here) or z patch for another library, you'll have to recompile your code and redistribute or reinstall it in order to avoid PC's being exposed to security vulnerabilities.
This is why Microsoft recommends to use dynamic libraries: these are easier to update/replace (eventually latest versions are already installed; or automatic windows update; or if necessary manual download of the latest version).
If you go for dynamic approach:
there are a couple of mfc*.dll to distribute with your application, together with other standard libraries, such as Msvcr100.dll. It's all explained in the article. Installing such files in your app's directory has the advantage of a leaner installation process. But you have to take responsibility for their update in case of necessity.
or you choose to use Microsoft's redistribuable packages. These can be downloded directly from Microsoft's and are contained in a selff-installable file: vc_redist*.exe. Here some explanations on how to use them in installation process. It might install more dlls than required, but vc_redist is an installed Microsoft product that is kept up-to-date with Windows Update.
If you link MFC statically, there is no need for external files.
Project Settings / General:
Use of MFC: Use MFC in a Static Library
But, as Christophe mentions, it is not recommended by Microsoft.
I read this page that explains what external libraries in Webstorm are, but I still have more questions: https://www.jetbrains.com/webstorm/help/configuring-javascript-libraries.html
Are external libraries only for code completion and help in production?
Can they be used to link libraries for example in index.html? (Probably not, because they are not found in the project folder).
I guess my question is what are the external libraries for, other than what I said in the beginning?
Javascript libraries configured in Settings/Languages&Frameworks/javaScript/Libraries (and shown as external libraries in the Project window) have absolutely nothing to do with references in your <script> tag. The former are used by IDE for code completion/navigation/error highlighting, the latter are used by browser in runtime. The browser knows nothing about javascript libraries configured in IDE, the IDE doesn't use <script> references in your HTML files.
Let me try to clear the things up:
What libraries are supposed to be used for: by default, completion works for all JavaScript files located under your project root. So, if you do already have the library .js files in your project structure, it's enough to get the completion. If they are missing, and you don't like to clatter your project with all these files, you can store them externally (outside of your project) and configure them as libraries to make them available to WebStorm. Note also that libraries are 'light-weight' as compared to .js files in your project - they are treated as read-only and have inspections turned off. Plus, you can assign documentation URLs to them, enabling external documentation for library code. So, even if you have your library files in your project, it might make sense to add them as libraries
So, to summarize:
library files placed next to your sources files in the project
structure are available to both WebStorm and browser, whether or not
they are added to javascript libraries in Settings
online library referenced via CDN link in your HTML is available to
the browser at runtime, but can't be used for completion in the
IDE
a library files placed outside of the project and configured as
javascript libraries will be available to WebStorm for completion,
but won't be loaded by a browser
So I am using Xamarin to create an Android App. All the android "stuff" will be in the Android project and I have created a Shared Project to house the business logic, so that I will be able to use it should I have to create an IOS app.
I have successfully referenced the Shared Project from the Android project - so far so good. So my Database code is in the shared project ready for any platform to use.
My app needs to connect to a webservice, so I wanted to house all that in the Shared Project but there seems to be no way to add references (web or otherwise) to a shared project - is this correct? surely it can't be or I wouldn't be able to use JSON.net in the Shared project or anything else that requires a reference to an external DLL...? Which would result in me duplicating any code like this multiple times, once in each platform.
Surely I am missing something here - any Google search returns how to reference a shared project from another project...Not what I need.
So the question is, can I add references in a Shared Project to a web service/3rd party DLL, if so, how do I do it?
Thanks for any help.
It's not possible to use reference directive in Shared project. You will have to instantiate the references on the platform specific project (Project.iOS) and pass it to the class in the shared project.
Use AppDelegate to define web Services references.
iOS Apps can't use shared libraries that you create yourself. The only ones you can use are those provided by Apple, in the System frameworks, that you'll find in the iOS SDK.
You can use static libraries. That might or might not solve your problem.
Possibly Xcode is enforcing this rule.
For a simple test, can you share a single source file, rather than a library?
Also they aren't called "DLLs" on iOS or Mac OS X, they're called "dylibs".
I've created a Class Mediator in which I want to intersect two policies. I've created the Class Mediator with Carbon Studio for Eclipse, which automatically adds some predefined libs to the build path of my project.
One of the libs is neethi-2.0.4.wso2v1.jar.
If I want to use the intersect-method I get an exception. If I have a look at the source I see that the intersect-method just throws an "UnsupportedOperationException".
So the given neethi lib is useless for intersection, therefore I want to use the newest Neethi lib (aka neethi-3.0.2.lib) for intersection inside my class mediator.
Could you tell me how I can include third party libs, especially in my use case these ones, that should override the once used inside the esb( neethi-2.0.4.wso2v1.jar).
Thanks
Developer Studio adds these libs to your project classpath, so that developers do not get build errors in the source code.
Therefore those libraries are only for the development time and available only with Dev Studio. They are not the libraries used in the runtime of the server.
Runtime libraries are provided by the WSO2 Carbon Server runtime. So this UnsupportedOperationException is thrown by the server is occurred due to the version of the neethi in the server does not support it. So you need to upgrade the library in the server runtime.
But as you can see, WSO2 have forked the neethi codebase and have some custom implementations on the forked source. So IMO, simply upgrading the version would not help.
Anyway you need to actually upgrade the library and see whether you face any issues with it.
To upgrade the versions, you can either create a Java Library artifact for newer Neethi library and include it in the CAR file and deploy the CAR file or copy the new Neethi library to <CARBON_HOME>/repository/components/lib location while the server is running.
You can find the current Neethi library in the <CARBON_HOME>/repository/components/plugins location. If you find some error or exception similar to "Linkage Error", then try to remove the older version of the library. But it would cause some other exceptions.
So IMO the bottom line is, you will face some issues with the version upgrade. But yes of course you can give a try and see, whether we can overcome them. Give it a try and post your observations here. We will try our best to assist you.