0

I have a Visual Studio solution in C++ containing 27 projects with known build order and everything else, I can successfully build entire solution and everything works fine, As you know after building each project some files will produce in "Debug" (or "release") folder and I access to them for each project, 26 projects of this solution needs no change, I just want to change one project, So I just wondered if I can use produced debug files of all 26 other projects and build my solution again in Visual Studio or any other IDE? Thank you so much

AardalanN
  • 5
  • 2
  • what exactly is the question , i'm all cofused , you want to know if you can reuse compiled lib files or ... ? – Raxvan Nov 21 '13 at 10:36
  • Visual Studio is smart enough to build only what needs to be built - If you're changing a shared header that multiple projects include, then you'll see them all get rebuilt each time - otherwise it should only build the project containing the modified source file(s) – benjymous Nov 21 '13 at 10:44

2 Answers2

1

The 'debug files' of visual studios are *.pdb files and are a proprietary MS format and therefore cannot be used in other IDEs: What is the structure of a PDB file?

The intermediate files of VS '*.obj' are generated for every translation unit but a conversion to another compiler is not achievable in an easy way: Is there a tool that can convert a Visual Studio object file to GCC format?

If you already have the VS solution you can make changes to the project you want to edit and VS will ensure that every project that needs a change will be recompiled and linked if you build the solution. If you want to spare time you can tell VS compile the project you are working on instead the entire solution. You might stay with VS if that works for you.

Adding support for another build-system or IDE should be done by an experienced developer who is familiar with those projects.

Community
  • 1
  • 1
DarthB
  • 351
  • 2
  • 6
  • thank you so much for your answer off course I want to use same compiler "Visual C++" so I'm not worried about conversion you talked about, and I have VS solution and I know VS doesn't rebuild all of solution but I have to use my project as I said is there any way to introduce these debug files(PDB and OBJ) files as external dependency or what? – AardalanN Nov 21 '13 at 12:01
  • I think you want to link to those projects. This can be done using the project properties. If you are lucky u can generate a new solution and import only the project you want to change. If that does not work you have to set path names of library/include directories and the names of the *.lib files you want to link in the project configurations see: http://en.wikibooks.org/wiki/C%2B%2B_Programming/Compiler/Linker/Libraries/Configuring_Visual_Studio – DarthB Nov 21 '13 at 12:22
  • Thank you so much it worked for me I used library files and dll files and I have same results as huge solution. – AardalanN Nov 24 '13 at 09:40
0

In theory, Visual studio will spot what has changed (in a solution) and just saying build should just build what has changed (and its dependencies).
Beware if using the libraries and exes from one compiler with those of another - you almost certainly need to use the same version of Visual Studio, since for example the implementations of the stl will change between version. Furthermore, if you use a different compiler things will almost certainly go horribly wrong.

If you use another IDE and point it to the same compiler, things should be ok.

edit
If by "another IDE" you mean another instance of the same IDE, i.e. you want to open a different solution, but use this as a "library" that's fine. You don't need the .obj files - they are part of the build process. It's the final .lib or .dll files you need, together with .pdb files if you want the debug symbols.

doctorlove
  • 18,872
  • 2
  • 46
  • 62
  • sure I want to use same compiler (Visual C++), you know for example I want to have a project in another IDE and add 1 project (the one that needs change) as it's source project and somehow(this is my question I don't know how?) attach debug files - of 26 other projects which I described - to it and have same results as VS with that huge solution containing 27 projects. – AardalanN Nov 21 '13 at 10:59
  • Are you actually trying to build some kind of library to use in other *projects* (rather than *other* IDEs)? – doctorlove Nov 21 '13 at 11:02
  • yes kind of, actually it doesn't really matter to do this in another IDE but I need to introduce .pdb and .obj files to another solution as external dependency or anything else I don't really know! – AardalanN Nov 21 '13 at 12:07
  • @jasper8000 - see edit. You haven't made your question very clear. You're asking about how to write a library, and how to deploy it, I reckon. – doctorlove Nov 21 '13 at 12:15
  • ohhhh my bad I didn't notice the "edit", this is exactly what I mean to do would you please explain a little more? thank you so much and sorry if the question is not clear actually I'm not familiar with expressions yet. – AardalanN Nov 21 '13 at 13:14
  • One of these two may help: http://msdn.microsoft.com/en-us/library/vstudio/ms235636.aspx or http://msdn.microsoft.com/en-us/library/vstudio/ms235627.aspx. They are about things in one solution, but just try it, and note you can browse to add a reference. – doctorlove Nov 21 '13 at 13:27
  • Thank you so much it worked for me I used library files and dll files and I have same results as huge solution. – AardalanN Nov 24 '13 at 09:40