How can I open more than one project in Webstorm 10, like in Visual Studio?
At the moment it's not possible to open 2+ projects in the same window and still have separate (independent) settings for each of them. To have independent settings you have to open projects in separate frames/windows.
You can "add" files from 2nd/3rd/etc project into main project by attaching that folder as separate node in Project View panel (but current project settings will apply to all of such additional nodes). That can be done via Settings (Preferences on Mac) | Project | Directories --> Add Content Root
Related
I am working on embedded c project. Till now I was using batch files and cmd prompt to compile the source files. Now I am planning to use Eclipse IDE for editing the code and compilation. The folder structure is as follows (refer the image)
Delivery folder remains same for all build scenarios since it contains the main module source files.
Test_Setup folder contains the test cases. Each TAxx had src and inc folder. In each TAxx_src folder, there is a .c file containing main function and and test functions. Currently using batch files for testing there is a batch file for each TAxx folder (in this case 4 batch files) which will compile the Delivery folder and the corresponding TAxx folder.
In eclipse I want to keep the same folder structure. But if I give build, eclipse will throw multiple "main" error. Hence I am unable to give build directly.
There is also a possibility of creating build configurations in eclipse. But since TAxx can be in 100s it will be difficult to create so many build configurations and maintain it.
How to effectively handle such a build scenario in eclipse. My task is to keep the folder structure same and while giving build, I must be able to select which TAxx folder I want to use for build.
Keeping the same folder structure, how can I compile Deliver folder and anyone TAxx folder?
Is there an option to create build configurations automatically?
After project is successful and all test cases are executed, the source code in moved to configuration management, but the eclipse project is not stored. Is there an option to export build configurations in a file so that it can be used when the project is again loaded in Eclipse?
Regards
Manoj
Left click in the Project Explorer tab -> New -> C Project
A C projet will be created with 2 build configurations as default: Debug and Release.
Left click on your project just created.
Right click -> New -> Folder
This way add all your folders according to your Project structure.
Go to Properties -> C/C++ General -> Source location tab -> Add folder button
Then select both folders available resulting in the following Project layout:
Go to Properties -> C/C++ General -> Includes tab -> GNU C Language -> Add button
And finally add all your include paths resulting as follows:
To select which folders to be used for compilation, you rather have to select the folders that will be excluded from build. To do this right click on folder to exclude -> Resource Configurations -> Exclude From Build -> select the build configuration
This way building is acomplished as required in your bullet 1 and 2 questions.
Bullet 3 - It is possible through makefiles, although it's trickier then letting eclipse manage the build process.
Bullet 4 - Build configurations are already stored in the Project, so when you load it again will be there available again.
If you want to creat more build configurations right click in the Project, Build Configurations -> Manage -> New -> Copy settings from Existing Configuration
But in my opinion you don't need to create hundreds of build configurations in your case. Maybe just the 2 regular ones, Release and Debug are enough. Selection is made by choosing which TAxx folder will not be excluded from build.
I setup eclipse IDE to use openCV. I followed the tutorial provided on openCV website. However, there is this extremely annoying issue am facing every time I create a new project. It seems I need to redo the entire process of pasting the library files in GCC C++ linker for every project that I create. Is there anyway of making them persistent for all new projects ? Or to at least be able to export the settings so that I can import them which will save time.
Thanks
I may have misunderstood the question, but if you just don't want to set up the project each time, you can save a build configuration in Eclipse.
To use another projects build configuration:
Project -> Properties -> C/C++ Build
Click Manage Configurations and create a new config (call it opencv or whatever).
Then set up your Includes, GCC linker etc as you have done before. Then hit Apply.
Now if you ever want to set up a new project with these configs, select your new project:
Project -> Properties -> C/C++ Build -> Manage Configurations
Click New and select 'Import from projects' and select your 'opencv' configuration. This will import the build set-up into the your new project.
Then just select it from the Configuration drop-down.
To export the build configuration as an XML file:
Right click project -> Export...
Select C/C++ -> C/C++ Project Settings
Select the Configuration you want to export and save it somewhere.
To import it into a project:
Right click project -> Import... -> C/C++ Project Settings
and browse for your config file
Hope this helps!
I would like to port my application from Linux to Windows. I'm trying to use visual studio to configure a project to build the Window application. The problem for me is that I only need a subset of files out my directory for Windows. But I would like to keep the integrity of the directory so that I don't need to checkout a subset of file to Windows. Does visual studio need the entire directory to be window files? For those who understand Window application development well, can you help me to understand:
Can I configure visual studio to build a project using a subset of the file from a directory?
If yes, how do I configure the project file? Any link to a tutorial would be really helpful.
Below are couple of quick suggestions using Visual Studio
Include/ Exclude :
If the number of file are minimum, then you could include or exclude files to a project manually.
You could add a directory to a project by copying the files to a folder under the .vcxproj(ur .<>proj) file.
Then select the project in the solution explorer and on the tool bar you would get an option Show All Files
Right click on the Folder or File and hit Include In Project. This will include the file/folder into your project.
You could Exclude any file that is already included in your project by, clicking the file and hit Exclude From Project.
Remove From Compilation Only:
Select the file in Solution Explorer and right click Properties
Under Configuration Properties -> General -> Excluded From Build set it to Yes/No
I have a C++ project proj1 with some source files in, however I would like to also use some of the source files I have in another project proj2. proj1 and proj2 are both subdirs of a directory my_projects. I don't want eclipse to copy the files as I want to ensure I have only one copy to edit. This is like the "add existing item" option of MS Visual Studio.
The end result I'm aiming for is to be able to create makefiles for both proj1 and proj2, zip up the two directories together and send them to coworkers so they can build the two projects themselves using make.
Is this possible in Eclipse? I've searched and haven't found the solution.
Phil
If you have proj2 open in Eclipse right click on the project and choose Import... and then select General > FileSystem and hit next. In the top window choose the directory in proj1 that contains the resources you want to link. After selecting the files you want to link in the top window hit the Advanced button to open up a submenu and select Create Links in Workspace as shown in this screenshot:
This question addresses setting up a Makefile with relative instead of absolute paths: Getting Eclipse CDT to use relative include paths in generated Makefiles
I looked forever for a solution to this, and I finally found it. Right click on the project and select Build Settings. Under the Build header on the left click "Settings". Then under the "Tool Settings" tab click "Directories" under the compiler header. Then click the add button at the top. If the desired files are in another project in the same workspace click the workspace button and then navigate to the exact folder where the files are. Once you have done this voila! you should be able to build the project!
How to make user include and lib folders globally and permanently available to all projects? In Visual Studio 2008 it is Tools -> Options -> Projects and Solutions -> VC++ Directories. In 2010 it says deprecated... blah blah... instead use property sheets... click '?' for help.... Click and it takes you to a web page about property sheets. Doesn't answer the basis question. How to set user library folders globally, once and for all?
Thank you.
Try this:
VC++ Directories are no longer supported in VS2010 through Tools->Options page. Instead, VS2010 introduces the user settings file (Microsoft.cpp..users.props) to control global settings including Global search path. These files are located at $(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 directory. Upon migration to VS2010, the custom settings of VC++ Directories from VS2005 or VS2008 are migrated to these user files. These global settings files are imported into all the converted and newly created projects.
Here are the steps to change the settings file through UI:
Open up property manager by clicking on View.Property Manager.
Expand the project node and then the Configuration|Platform nodes, you will see "Microsoft.cpp..users" file for each Configuration|Platform. These are the files for the global settings, similar to the old tools/Options/VC++ Directories.
Multi-Select "Microsoft.cpp..users", right click and bring up the property page window
In the property page window, click on "VC++ Directories" (for example) in the left pane, add new paths for the directories such as "Include Directories". separated by semicolons
Make sure to save the settings before shutting down Visual Studio.
Re-launch Visual Studio and the new settings will be in effect.
Note: If you would like to only change the settings for one project, you can right click on the project and bring up the property page. Change the settings for “VC++ Directories”, these settings will be persisted to the project file.
I found this article helpful.
You can select all the project and edit them all at once.
Open the class view and select all projects.
select configuration properties node and then VC++ directories.
select Included Directories, Libraries Directories and click the
button next to it. Select edit and enter the additional paths you
need, this will be add to all the selected projects.
You can delete any common directories among the selected projects.