User forums > Using Code::Blocks

Noob question: C::B to gcc script

(1/1)

DeathByChocolate:
I have a working CodeBlocks project with many includes and linked-in libraries.  I want to compile and link outside of CodeBlocks.  How can I get an equivalent gcc or g++  command or script that does the equivalent compile-and-link operation?

MortenMacFly:
You can try the cbMakeGen (cbMakeFileGen?!) plugin (search the forums) - but it may not work for you.

Hence - do you know, that you can run C::B in batch mode? This means C::B compiles your project/workspace without opening the IDE. Check the command line arguments accordingly.

DeathByChocolate:
Thanks, but I can't get cbmakegen to install. :(

stahta01:
Other options include using

premake to create the project; but this requires work of creating an premake.lua script for for the project.

cmake to create the project; but this requires work of creating an cmake list file.

cmake takes less work to create build file, but only creates an Code::Blocks makefile project.

premake takes more work to create build file; and, it can create regular Code::Blocks project.

premake https://sourceforge.net/projects/premake/
Note: More examples exist for version 3; so, first time users should use version 3.

cmake http://www.cmake.org/

Edit: I use premake, but have not used cmake.

Tim S

rcoll:
If you just want a simple script to build everything (not a Makefile) turn on full command-line logging, then copy out the log file to a text file.  Edit that to create a simple script.

Ringo

Navigation

[0] Message Index

Go to full version