Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: sparckis on April 22, 2007, 09:34:12 pm

Title: Adding options to linker
Post by: sparckis on April 22, 2007, 09:34:12 pm
Hello,
     I'm trying to use open GL to compile and run a tutorial I found on the web.  Basically, if I use the command line argument "gcc hello.cpp -lglut -IGL -o hello" i get a binary output hello as expected.  I can run the program and it works fine.  If I just put the C code into code blocks, it craps out.  I'm sure I just need to tell codeblocks to insert the -lglut -IGL options (at compile or link?)and all will be good.  I just don't know where to put that.  I am using codeblocks rev 3592, any help would be awesome

Thanks,
~Mark
Title: Re: Adding options to linker
Post by: darthdespotism on April 22, 2007, 10:25:36 pm
Go to Project->BuiltOptions and switch to LinkerOptions in the second ComboBox. There you can add the Libraries either without the -l on the left side or with thi -l on the right
Title: Re: Adding options to linker
Post by: sparckis on April 22, 2007, 10:57:54 pm
yes...YYYYEEEEEEEES, that worked!  I just put in GL and glut  .

Thankyou so much, I hate wasting time figuring this stuff out when there are geniuses out there like you willing to help...thanks again, now I can dig into the meat of the GL programming I wanted in the first place

YES!