Yoda
Yoda

Reputation: 18068

-lglut32 cannot be found

I run my project which uses:

#include <C:\Users\R\Desktop\LABO3\zad3\Debug\glut.h>

but then when I build it I get this error:

--------------------Configuration: zad3 - Release--------------------
Linking...
C:\Program Files (x86)\MinGWStudio\MinGW\bin\..\lib\gcc\mingw32\3.4.5\..\..\..\..\mingw32\bin\ld.exe: cannot find -lglut32
collect2: ld returned 1 exit status

zad3.exe - 1 error(s), 0 warning(s)

How to fix this? I got the dll in the projects directory.

Upvotes: 0

Views: 7556

Answers (1)

Lightness Races in Orbit
Lightness Races in Orbit

Reputation: 385295

I got the dll in the projects directory.

Then you need to provide -L. on the compilation command line.

Otherwise the DLL should be in some system directory that's on the PATH.

Compilers generally expect libraries to be system-installed and available from anywhere on that system, rather than in some specific project's directory.

Upvotes: 1

Related Questions