Author Topic: Add glut32.dll into the complied executed file  (Read 10672 times)

Offline jcheng3305

  • Multiple posting newcomer
  • *
  • Posts: 11
  • Super!
Add glut32.dll into the complied executed file
« 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. :?
New guy on C++/Code::Blocks/OpenGL....!

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Add glut32.dll into the complied executed file
« Reply #1 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.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline jcheng3305

  • Multiple posting newcomer
  • *
  • Posts: 11
  • Super!
Re: Add glut32.dll into the complied executed file
« Reply #2 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?
New guy on C++/Code::Blocks/OpenGL....!

Offline jcheng3305

  • Multiple posting newcomer
  • *
  • Posts: 11
  • Super!
Re: Add glut32.dll into the complied executed file
« Reply #3 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.
New guy on C++/Code::Blocks/OpenGL....!

Offline reckless

  • Regular
  • ***
  • Posts: 338
Re: Add glut32.dll into the complied executed file
« Reply #4 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.

Offline jcheng3305

  • Multiple posting newcomer
  • *
  • Posts: 11
  • Super!
Re: Add glut32.dll into the complied executed file
« Reply #5 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.
New guy on C++/Code::Blocks/OpenGL....!

Offline Folco

  • Regular
  • ***
  • Posts: 343
    • Folco's blog (68k lover)
Re: Add glut32.dll into the complied executed file
« Reply #6 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.
Kernel Extremist - PedroM power ©

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Add glut32.dll into the complied executed file
« Reply #7 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 !