Search code examples
c++linuxunixcodeblocks

How to start a CodeBlocks project from external code and Makefile?


I have C++ code that depends on boost and other libraries, and therefore this code has a makefile that invokes boost.

I am now trying to start developing this code in CodeBlocks in linux, so in order to do that I have two basic questions:

(1) How can I import the code into CodeBlocks as a CodeBlocks new project? This seems to be a good rec: http://www.programmingforums.org/thread44976.html

(2) How do I invoke the makefile with CodeBlocks instead of CodeBlocks trying to compile the code (which would fail since CodeBlocks do not know that it needs to invoke boost)?


Solution

  • Most projects can be compiled without a makefile, so just include files, and if you need an extra library include that in a project. If your project uses header-only boost libraries and you have packet installed libboost-dev (this is on my Debian) then it is included automatically. Else just use the proper library name in settings (I can't remember if you need to append l to the name).