Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: jcheng3305 on April 18, 2010, 05:00:40 am

Title: Add glut32.dll into the complied executed file
Post by: jcheng3305 on April 18, 2010, 05:00:40 am
Would like to know if Code::Block can be set that glut32.dll can be added into each complied file.  Tks. :?
Title: Re: Add glut32.dll into the complied executed file
Post by: MortenMacFly on April 18, 2010, 04:03:31 pm
Would like to know if Code::Block can be set that glut32.dll can be added into each complied file.  Tks. :?
Yes, add it to the global compiler options.
Title: Re: Add glut32.dll into the complied executed file
Post by: jcheng3305 on April 19, 2010, 09:58:20 am
Noted.  But I don't how to add this into,  Is it under Compiler and Debugger settings > Gobal Compiler Setting?   And then where?
Title: Re: Add glut32.dll into the complied executed file
Post by: jcheng3305 on April 24, 2010, 10:04:59 am
Yes, I did use "Full Command Line", but it still doesn't work unless we put glut32.dll at the same folder of execute file as before.   Please advise if any other method that we can put glut32.dll into the execute file during compilation, as it seems not a good practice to ship your execute with glut32.dll.  Tks.
Title: Re: Add glut32.dll into the complied executed file
Post by: reckless on April 24, 2010, 03:18:50 pm
are you trying to link a dll into the executable as a static library ?!?

freeglut comes with a static library you can link against to avoid the dll completely.
Title: Re: Add glut32.dll into the complied executed file
Post by: jcheng3305 on April 24, 2010, 04:57:51 pm
I am sorry that I have no idea about "static library".  Can you tell me some more about this?  Are they the libraries somewhat like we added into, under Project Build Options > Linker Settings?  Where can I find those library that would suit for my platform of Windows Vista?  With many thanks.
Title: Re: Add glut32.dll into the complied executed file
Post by: Folco on April 24, 2010, 05:06:51 pm
A dynamic library is linked to your program at run-time. It's an external file (.dll, .so) that the linker of your OS launch when your program is launched. And your programs use some functions/data of this file.

A static library is included in your program at compile-time. Only parts of the lib that you use are added. So your program can be executed without being linked to a .dll file by the OS.
Title: Re: Add glut32.dll into the complied executed file
Post by: Jenna on April 24, 2010, 05:09:42 pm
I am sorry that I have no idea about "static library".  Can you tell me some more about this?  Are they the libraries somewhat like we added into, under Project Build Options > Linker Settings?  Where can I find those library that would suit for my platform of Windows Vista?  With many thanks.
If you don't know the difference between statically and dynamically linking, you are in the wrong forum.

You should start with a good book and/or tutorial, that teaches you the programming basics.

The C::B forum is dedicated to C::B related questions only, not to teach programming in general.

Your thread therfore violates our forum rules.

Topic locked !