User forums > Using Code::Blocks

Command line style compile in Code::Blocks?

(1/1)

Alwayssnarky:
I am attempting to complete a tutorial using codeblocks, and one of the instructions is to compile it with the commands " g++ src/*.cpp -o tuto -Iinclude -Llib -ltcod-mingw-static-libgcc -static-libstdc++ -Wall".  Is there a way to type that out to compile in codeblocks?  And if not, wat would I do instead?  Thanks!

oBFusCATed:
Create a project and press build...

Or just open the file and press build or compile file...

Alwayssnarky:
Returns the error "||=== Build: Debug in TestRL (compiler: GNU GCC Compiler) ===|
obj\Debug\main.o||In function `main':|
C:\coding\projects\TestRL\main.cpp|3|undefined reference to `_imp___ZN11TCODConsole8initRootEiiPKcb15TCOD_renderer_t'|
C:\coding\projects\TestRL\main.cpp|5|undefined reference to `_imp___ZN10TCODSystem13checkForEventEiP10TCOD_key_tP12TCOD_mouse_t'|
C:\coding\projects\TestRL\main.cpp|6|undefined reference to `_imp___ZN11TCODConsole4rootE'|
C:\coding\projects\TestRL\main.cpp|6|undefined reference to `_imp___ZN11TCODConsole5clearEv'|
C:\coding\projects\TestRL\main.cpp|7|undefined reference to `_imp___ZN11TCODConsole4rootE'|
C:\coding\projects\TestRL\main.cpp|7|undefined reference to `_imp___ZN11TCODConsole7putCharEiii17TCOD_bkgnd_flag_t'|
C:\coding\projects\TestRL\main.cpp|8|undefined reference to `_imp___ZN11TCODConsole5flushEv'|
C:\coding\projects\TestRL\main.cpp|4|undefined reference to `_imp___ZN11TCODConsole14isWindowClosedEv'|
||=== Build failed: 8 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|"

stahta01:
If you want help, please read and follow this FAQ.
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F

This means post a "build log" NOT a message log!

Link to user docs that might help you.
http://wiki.codeblocks.org/index.php?title=User_documentation

Tim S.

Alwayssnarky:
Ok, I figured it out, I was misunderstanding how the linking and such worked, and confused myself.  Sorry to trouble you with my newbie mistakes.  Thanks for the help!

Navigation

[0] Message Index

Go to full version