Multiple c++ Eclipse Helios Projects with Source in a Single Directory - eclipse-cdt

I'm working on a legacy codebase that has all the code for multiple c++ executables and static libraries in a single folder.
I'm wondering if its possible to create projects in Eclipse Helios for each of these without moving the corresponding source to its own directory?

You can create Eclipse projects anywhere, then in each of the project do:
RMB on project->New->Folder, expand Advanced>>, select Link to alternate location (Linked Folder) and browse to the directory where your shared sources are located.
Or you can have one project with multiple targets instead.

Related

Synchronising SFML with C++ Project on GitHub

At the moment I'm using Visual Studio C++ with SFML Graphics, Windows, and System libraries (plus opengl / relevant dependencies).
I'm attempting to sync this project with a group of us who all need to work on it (via GitHub) but it seems (at first glance, at least) like the project file will need different 'include' paths for each person wanting to run the project on their machine. Could get tedious if we're all constantly syncing different settings.
TL;DR: Is there a way to install SFML to the project directory so that the project can be opened and run on any machine without needing to configure the project settings?
As a variant, I'm storing only source in the repository, without project preferences. It also helps in different platforms. I use windows+visual stuido and linux+eclipse.
Or you really can put "include", "lib" folders of SFML into your projects directory like other usual files.

Visual Studio 2010 Creating Packages/Folders in project

I am new to Visual Studio 2010 C++, I am trying to create packages in my project like we do in Java Eclipse but to my surprise the only option I found available was Creating a Folder so I selected that and created several folders added my classes to them then I tried including my header files in the folders I had created but it keeps giving me an error to hat I cannot locate the file, I checked in the Project directory and the folders are not in there but very visible and editable from Visual studio, I tried manually adding a folder with my classes from windows explore and still could not locate them in VC
The logic is organized slightly different than in Eclipse.
With Visual Studio, you create a solution (one directory) in which you will create one or more projects (either in the solution's directory, or in one or several subdirectories. I you have in your components a shared library for example, you would put in a separate project.
The source files in each project are organized in the same directory. If you use folders in a project, these are virtual and not materialized in the OS directories.
Remark: If you really want to organise project files within "hard" subdirectories, you can always force the directory in the item creation dialog. This is particularly practical if you add to a visual studio projects existing items stored according to a more complex OS structure. Unfortunately such a directory structure is not at all displayed in the solution explorer, so it is somewhat confusing.

How to open existing C++ project with Eclipse?

I have two projects in C++ that I need to run and build both in Windows and Linux.
We are using Microsoft TFS for source control.
For windows we are using Visual Studio.
For Linux we are using Eclipse. (I don't have much experience with Eclipse)
I had managed to configure and build properly the projects in both platforms.
I checked in TFS the .cproject and .project from eclipse, so I can use it in another computer.
Now I am trying to get the projects in another Linux computer and I don't know how to do it.
I tried following this instructions, but I don't have my source code zipped.
Other places like here suggest creating a new project.
Isn't there a way to open an existing project in Eclipse similar to Visual Studio?
Do I have to create a new project? If so, how can I keep the configurations I did to be able to build the project so other developer can use them?
File > Import... > General > Existing projects into workspace
Don't select an archive file. Set the root directory to where your .project and .cproject files are located. Your project should show up in the list. Make sure you don't forget to check the checkbox in front of your project.
Committing eclipse project files to a version control system is perfectly fine as long as you don't use absolute paths in your project settings. Use environment variables to specify paths which differ between developer machines.

Project files in KDevelop

I am trying to use KDevelop to write a cmake based simple application. KDevelop created two myProject.kdev4 project files: one in the project folder and one in .kdev4 hidden subfolder. Both are non-empty. Which ones should I check in? How can I make kdevelop use just one project file (and preferably not use hidden folders)?
The .kdev4 file is used for kdevelop specific information (It mainly only tells KDevelop to use the CMake project manager). The folder includes user specific configuration (If you are familiar with Visual Studio, it is like the .user files).
Usually only the CMakeLists.txt files are needed as they should have all the relevant generic data. You can throw in the .kdev4 file so that you don't need to 'import' the project through the CMakeLists.txt on another machine. But the .kdev4 folder should stay in your local machine, as you don't want to mix user's configurations.

More with eclipse cdt

What is done when we import an existing project(maybe a visual studio project)?
Which files are used for configuration?
Try this one, you may get some information.
Migrate Visual Studio C and C++ projects to Eclipse CDT
Eclipse manages files completely differently than Visual Studio, files are managed by Eclipse and placed into the project workspace. Adding existing files has the aggravating effect of copying the files from their location into the workspace. There are workarounds for this (adding a link to existing file, makefile-only projects) but the default is to copy files around.
This is great if your project is managed by Eclipse alone, not great if you want a VS project AND an Eclipse project for the same codebase.
I'm don't think you can import a VS project into Eclipse CDT, at least not the way you're thinking.
The files used for configuration are stored in (path to workspace)/.metadata, there are a LOT of files that change constantly and can contain absolute paths. Caveat emptor.
There is no explicit wizard for importing visual studio project files. What you import is a directory tree full of source code files. Basic information about this is worked out and stored in a file called .project, which contains the settings from Project/properties.
If, when you create or import the project, 'use default location' is specified, the tree is copied into a workspace directory. If not, it is left where it is.
If the project type is 'makefile project', the only real assumption is that there is some external command to be run to build the software. Project properties/C++ build can be used to specify this command - by default, it is 'make'.
DevStudio can export a makefile for one of it's projects - from the Project menu, select 'Export Makefile'. Or you can just write one by hand, or use some other build tool such as ant.
If all else fails, set the build command to 'cat' (e.g. from cygwin) and the build argument to the name of a file that contains the output log from however the software was built.
Eclipse itself has two kinds of projects - those with makefiles, and those that it manages itself.
Makefile projects have a separate make file that you generally write on your own.
Eclipse managed projects have a .project file that is used by the IDE to create make files on the fly, when you build your project.
Are you asking specifically for visual studio projects, or is that just an example?