1

I am trying to compile a game that I don't made but it is failing due to LOTS and LOTS of errors that are "undefined reference to __glewSomething"

The project by default links against the dll version of glew, that gives those errors, when I link against the static version, I get a different set of errors.

The second set of errors, is described here on this site. But the solution there don't worked.

The set of errors that I am getting, are happen when linking against the dynamic, not the static version, thus the reply on this question instead is likely wrong.

I did attempted the solutions there anyway, don't worked.

The only thing I don't tried yet is stuffing the glew.c files on the project and compiling with it, but I wanted a real solution, why glew is problematic to link like that? (there are lots of similar questions, not just here on SO but all over the internet)

Community
  • 1
  • 1
speeder
  • 6,197
  • 5
  • 34
  • 51
  • 1
    There are a lot posts on the Internet about problem with linking with third party libraries, not just GLEW, because a lot people make the same mistakes. I have no idea what's causing your problem because the only information you've given about your actual problem is a partial error message. Try creating a minimal complete and verifiable example that reproduces the problem and include in your question itself, along with the commands you used to build it. http://stackoverflow.com/help/mcve – Ross Ridge Aug 01 '15 at 17:20
  • 1
    The project is not mine, I don't even know what glew do, how I am supposed to do that? I just want to compile a game so I can play it updated and fix some bugs on my own. – speeder Aug 01 '15 at 21:25

1 Answers1

0

I am assuming that you are on Linux, since you have not mentioned what OS you are on. You can try this:

pkg-config --libs --static glew

Copy the libs it returns and paste after gcc/g++ command in the following format:

 g++ <input-file> -o <output-file> <output from pkg-config>

This is supposed to solve your problem.

  • 2
    you should really read the question, and tags. dlls (mentioned in the question) are windows only. the tags also have "windows" and "mingw-w64" in them, w64 even refers to "Windows 64bit" so even the amount of bits of my OS is known in the question. – speeder Feb 03 '17 at 21:57
  • **Please see** [ask] **and** [answer] – Shakiba Moshiri Feb 10 '17 at 02:22