Convert VS2010 to C::B project

Feb 16, 2013 at 2:29pm
I'm having trouble defining include directoroes for C::B after transferring everything from a VS2010 project.

My directory structure looks like this:
bin
doc
inc
  \_ MyProj
    \_ MyHeader.hpp
lib
proj
  \_ MyProj.cbp <-- New Code::Blocks project
  \_ MyProj.sln <-- Existing Visual Studio solution
src
  \_ MySource.cpp


In MySource.cpp I #include <MyProj/MyHeader.hpp> . However, I get a fatal error that MyHeader.hpp cannot be found. I'm using <> headers because I am building a library and the headers will be available in the API.

In "Project>Build Options>Search Directories", I've added ../inc. What else do I need to do in C::B?

Last edited on Feb 16, 2013 at 2:57pm
Feb 16, 2013 at 2:36pm
Isn't it supposed to be ""( double quotes ) for local files?
Feb 16, 2013 at 2:47pm
Normally yes, however the project (with hundreds of source files) was created like this and works well in VS2010. The end user of the library still uses VS, but I've switched to linux so no VS for me. I'd like to make a code::blocks project that uses the same source so that it can be developed in a parallel environment (Linux and windows). Other than the <> which should be available to any C++ compiler, there is no compiler/IDE/platform-specific code.

The reason that we use <> is that this is a library and some of the header file include each other. Since it's a library, it's designed to go into a compiler's include folder (like with <boost/..>). We want to keep the same headers for our development and the distributed release identical so we include <> instead of with "".


Edit: The <> isn't actually the main problem. I replaced the <> in the first source file with "" and still got the same fatal error.
Last edited on Feb 16, 2013 at 5:40pm
Feb 16, 2013 at 4:10pm
Show the compilation command
Feb 16, 2013 at 4:44pm
I'm beginning to dislike Code::blocks. I can't even find the generated command line arguments. It's been 3 hours since I installed it and I'm already tempted to toss it out.
Last edited on Feb 16, 2013 at 4:48pm
Feb 16, 2013 at 5:05pm
I'm just going to go ahead and make my own makefile. I'm guessing it will be easier.
Feb 16, 2013 at 5:17pm
> I can't even find the generated command line arguments.

Settings => Compiler => Global compiler settings => Other settings => Compiler logging: "Full Command Line"


> I'm just going to go ahead and make my own makefile. I'm guessing it will be easier.

Yes. Makefiles are a lot easier to manage than assorted, idiosyncratic IDE build mechanisms.
For a non-newbie, that is.
Last edited on Feb 16, 2013 at 5:21pm
Feb 16, 2013 at 5:29pm
Ah, there it is!

-------------- Build: Debug in SimEng ---------------

g++  -Wall -pg -g -I../inc -I../src  -c /home/stew/SVN/SimEng/src/A429BCD.cpp -o ../bin/src/A429BCD.o
/home/stew/SVN/SimEng/src/A429BCD.cpp:1:30: fatal error: SimEng\A429BCD.hpp: No such file or directory
compilation terminated.
Process terminated with status 1 (0 minutes, 0 seconds)
1 errors, 0 warnings

So I can see that I do include the ../inc directory. I can also confirm that /home/stew/SVN/SimEng/inc/SimEng/A429BCD.hpp exists.
Feb 16, 2013 at 5:42pm
> error: SimEng\A429BCD.hpp:
¿backslash?
Feb 16, 2013 at 5:48pm
OMFG

sigh... solved
Last edited on Feb 16, 2013 at 5:49pm
Topic archived. No new replies allowed.