last GLFW and site examples

CodeLite installation/troubleshooting forum
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

last GLFW and site examples

Post 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?
You do not have the required permissions to view the files attached to this post.
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: last GLFW and site examples

Post 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
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: last GLFW and site examples

Post by borodadada »

I add library GLFW and freeglut, but...
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: last GLFW and site examples

Post 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
Make sure you have read the HOW TO POST thread
borodadada
CodeLite Enthusiast
Posts: 22
Joined: Wed Oct 16, 2013 4:20 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: last GLFW and site examples

Post 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
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: last GLFW and site examples

Post 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
Make sure you have read the HOW TO POST thread
User avatar
Jarod42
CodeLite Expert
Posts: 240
Joined: Wed Sep 30, 2009 5:54 pm
Genuine User: Yes
IDE Question: C++
Location: France
Contact:

Re: last GLFW and site examples

Post 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).
Post Reply