Convert VS2010 to C::B project

I'm having trouble defining include directoroes for C::B after transferring everything from a VS2010 project.

My directory structure looks like this:
  \_ MyProj
    \_ MyHeader.hpp
  \_ MyProj.cbp <-- New Code::Blocks project
  \_ MyProj.sln <-- Existing Visual Studio solution
  \_ 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
Isn't it supposed to be ""( double quotes ) for local files?
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
Show the compilation command
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
I'm just going to go ahead and make my own makefile. I'm guessing it will be easier.
> 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
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.
> error: SimEng\A429BCD.hpp:

sigh... solved
Last edited on
Topic archived. No new replies allowed.