News:

When registered with our forums, feel free to send a "here I am" post here to differ human beings from SPAM bots.

Main Menu

Command line style compile in Code::Blocks?

Started by Alwayssnarky, May 23, 2014, 08:31:42 PM

Previous topic - Next topic

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...
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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

C Programmer working to learn more about C++.
On Windows 10 64 bit and Windows 11 64 bit.
--
When in doubt, read the CB WiKi FAQ. [url="http://wiki.codeblocks.org"]http://wiki.codeblocks.org[/url]

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!