Author Topic: How to configure freeglut Windows7 64Bit (ld.exe cannot find -lfreeglut ) error  (Read 9370 times)

Offline Hesam

  • Single posting newcomer
  • *
  • Posts: 4
It is almost 48 hours I am googling for configuring Glut or Freeglut on Windows7 64 Bit platform.
The best tutorial I fund is this:
http://wiki.codeblocks.org/index.php?title=Using_FreeGlut_with_Code::Blocks

First of all I should say that I had problem in compiling Code::Block on Wondows7 64 bit. I solve this issue by this method:
1. Uninstall this version (codeblocks-10.05mingw-setup.exe)
2. Download this one (codeblocks-10.05-setup.exe)
3. Download this file(tdm64-gcc-4.6.1.exe)
4. check this settings in Compiler setting:
    C complier:                    x86_64-w64-mingw32-gcc.exe
    C++ complier:                 x86_64-w64-mingw32-g++.exe
    Linker for dynamic libs:     x86_64-w64-mingw32-g++.exe

Then I tested a simple console project and successfully finished.

Then I followed the above tutorial step by step. At the end when I create a new Glut project and run it I get this error:

File          Message

Ld.exe      cannot find -lfreeglut
            === Build finished: 1 errors, 0 warnings ===

Please advise
« Last Edit: July 22, 2012, 01:58:46 pm by Hesam »

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: How to configure freeglut for Windows7 64Bit
« Reply #1 on: July 22, 2012, 01:16:03 pm »
Search the forum, it was discussed before...
(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 Hesam

  • Single posting newcomer
  • *
  • Posts: 4
Re: How to configure freeglut for Windows7 64Bit
« Reply #2 on: July 22, 2012, 01:29:48 pm »
Yes I did search the forum, the best topic I fund in the forum is this:
http://forums.codeblocks.org/index.php/topic,15623.msg105161/topicseen.html#msg105161
and it is reply by JackDawson the writer for the tutorial I mentioned. It discusses the editing of two glut files which is not my issue.
« Last Edit: July 22, 2012, 01:32:08 pm by Hesam »

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: How to configure freeglut for Windows7 64Bit
« Reply #3 on: July 22, 2012, 01:59:18 pm »
Yes I did search the forum, the best topic I fund in the forum is this:
http://forums.codeblocks.org/index.php/topic,15623.msg105161/topicseen.html#msg105161
and it is reply by JackDawson the writer for the tutorial I mentioned. It discusses the editing of two glut files which is not my issue.
1.) freeglut != glut.
2.) Where did you put freeglut? This is "freeglut_folder".
3.) In your project/target's build options (as you prefer) under "Search directories" add "freeglut_folder\include" under the compiler includes, add "freeglut_folder\lib" under the linker includes.

Most important: I hope you also understand what you are doing with these steps and therefore how you drive a compiler/linker. If not, you are in trouble and should read yourself into the principles of programming in C/C++ with GCC (MinGW).

Edit... and also read this:
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29
...carefully.
« Last Edit: July 22, 2012, 02:01:33 pm by MortenMacFly »
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 Hesam

  • Single posting newcomer
  • *
  • Posts: 4
OH!1!!!!!!!!!!!!!!!!!!!!

MYGODDDDDDD
IT WORKSSSSSSSSSSSSSS IT WORKSSSSSSSSSSSSS

THANK YOU MORTEN! I LOVE YOU :ddddd