Code::Blocks Forums

User forums => Help => Topic started by: Hesam on July 22, 2012, 01:04:43 pm

Title: How to configure freeglut Windows7 64Bit (ld.exe cannot find -lfreeglut ) error
Post by: Hesam on July 22, 2012, 01:04:43 pm
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
Title: Re: How to configure freeglut for Windows7 64Bit
Post by: oBFusCATed on July 22, 2012, 01:16:03 pm
Search the forum, it was discussed before...
Title: Re: How to configure freeglut for Windows7 64Bit
Post by: Hesam 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.
Title: Re: How to configure freeglut for Windows7 64Bit
Post by: MortenMacFly 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.
Title: Re: How to configure freeglut Windows7 64Bit (ld.exe cannot find -lfreeglut ) error
Post by: Hesam on July 22, 2012, 02:10:46 pm
OH!1!!!!!!!!!!!!!!!!!!!!

MYGODDDDDDD
IT WORKSSSSSSSSSSSSSS IT WORKSSSSSSSSSSSSS

THANK YOU MORTEN! I LOVE YOU :ddddd