Jump to content
  • Advertisement
Sign in to follow this  
pc31

use glew with Dev-C++

This topic is 4808 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I want to use glew with Dev-C++ I think it is possible because, exemple exist. But they dont work, there is a "link error". I add "-lglew" in compiler option, and it s dont work :( he says : "cannot find -lglew" :( please help me ps : i am french (my english is not perfect)

Share this post


Link to post
Share on other sites
Advertisement
Dev-C++ (or rather, the MinGW linker) uses .a library files instead of .lib, so you'll need to compile the GLEW library yourself to be able to link to it. It's either that, or find somebody else who has already done so.

*Several minutes later*

Okay, I just finished compiling it for you. :)

glew.a

Share this post


Link to post
Share on other sites
thank :)

but I have add "glew.a" in the lib/ dirrectorie, and there is the same error.
He say : "cannot find -lglew"

In my compiler option i have :
"-lglew -lopengl32 -lglut32 -lglu32 -lcg -lcgGL"

ps : i use windows

Share this post


Link to post
Share on other sites
MinGW doesn't care if it's .lib or .a, just as long as it understands its structure. In saying that, the problem here is probably due to the fact that the compiler has nfi what you're talking about, because you haven't set the libraries path. In Dev-C++, click Tools, then Compiler Options, then Directories, then Libraries, and add the path to your library (click Delete Invalid to check it), and click OK. If it still doesn't find it, then I'm out of ideas.

Share this post


Link to post
Share on other sites
Quote:
Original post by Cocalus
Try renaming it to libglew.a


This helped me too, so i think it will solve your problem (at least when you have an a. file, otherwise supply the complete path without the -l).

Share this post


Link to post
Share on other sites
i have rename the lib
now he know "-lglew" !

but there is a link problem

ex1.o(.text+0x139):ex1.cpp: undefined reference to `_imp__glewInit'

ex1.o(.text+0x14f):ex1.cpp: undefined reference to `_imp__glewGetErrorString'
ex1.o(.text+0x16d):ex1.cpp: undefined reference to `_imp__glewGetString'

Share this post


Link to post
Share on other sites
You can just add the glew32.dll directly to the linker. Just download the windows binarys from the GLEW website. Copy the glew32.dll into your project directory. Then From dev-cpp just
Project
Project Options
Parameters
Add Library or Object
Switch Files Type to all files (*.*)
Select glew32.dll
Remove any old references to GLEW from that list (ie -lglew).
Click Ok

And it should compile (I just got this to work on my system).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!