Author Topic: Command line style compile in Code::Blocks?  (Read 3625 times)

Offline Alwayssnarky

  • Single posting newcomer
  • *
  • Posts: 3
Command line style compile in Code::Blocks?
« on: May 23, 2014, 08:31:42 pm »
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!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Command line style compile in Code::Blocks?
« Reply #1 on: May 23, 2014, 08:53:44 pm »
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!]

Offline Alwayssnarky

  • Single posting newcomer
  • *
  • Posts: 3
Re: Command line style compile in Code::Blocks?
« Reply #2 on: May 23, 2014, 09:34:12 pm »
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)) ===|"

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Command line style compile in Code::Blocks?
« Reply #3 on: May 23, 2014, 09:48:01 pm »
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.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline Alwayssnarky

  • Single posting newcomer
  • *
  • Posts: 3
Re: Command line style compile in Code::Blocks?
« Reply #4 on: May 23, 2014, 11:34:13 pm »
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!