Page 1 of 1
last GLFW and site examples
Posted: Thu Jan 08, 2015 3:32 pm
by borodadada
Hello, i download and include GLFW. Create windows - complite, but create example 2, error - on picture
GLWF site
http://www.glfw.org/docs/latest/quick.h ... ate_window
What am I doing wrong?
Re: last GLFW and site examples
Posted: Thu Jan 08, 2015 4:41 pm
by Jarod42
You can see error in the build tab.
you will probably see undefined reference to some functions.
Do you link with the libraries ?
see:
Project setings... -> Common settings -> linker -> libraries
Re: last GLFW and site examples
Posted: Thu Jan 08, 2015 6:29 pm
by borodadada
I add library GLFW and freeglut, but...
Re: last GLFW and site examples
Posted: Thu Jan 08, 2015 6:55 pm
by eranif
Not really a CodeLite issue, quick Google for the first error "__glutinitwithexit @12" gives this
http://stackoverflow.com/questions/1288 ... codeblocks
and this
https://www.opengl.org/discussion_board ... -undefined
Eran
Re: last GLFW and site examples
Posted: Thu Jan 08, 2015 8:02 pm
by borodadada
Hmm... did not work
I create in VS project, all work
#pragma comment(lib, "freeglut.lib")
#pragma comment(lib, "glew32.lib")
#include <windows.h> // For MS Windows
#include "file\glew.h"
#include "file\freeglut.h" <---------- in codelite this not work
wants to be here and it worked , I used to write here
Re: last GLFW and site examples
Posted: Sat Jan 10, 2015 10:11 pm
by eranif
borodadada wrote:#include "file\freeglut.h" <---------- in codelite this not work
Some clarifications:
CodeLite is not a compiler, i.e. if the above does not work, then the problem is with your compiler/setup, and from what I could see, the library is setup properly within codelite
You should really google this error with MinGW (the compiler you are using)
Eran
Re: last GLFW and site examples
Posted: Mon Jan 12, 2015 12:45 pm
by Jarod42
borodadada wrote:
#include "file\glew.h"
#include "file\freeglut.h" <---------- in codelite this not work
Unrelated to Codelite.
BTW, the portable way for include is to use `/` ("file/freeglut.h").
#pragma comment(lib, "xxx.lib")
is Msvc specific, gcc doesn't support that, you have to specify your libraries in the linker settings (and choose the correct ones).