Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: unresolved external symbol _glewInit  (Read 2168 times)

0 Members and 1 Guest are viewing this topic.

radiKal

  • Newbie
  • *
  • Posts: 2
    • View Profile
unresolved external symbol _glewInit
« on: April 11, 2015, 05:22:04 pm »
I am trying to make a game with SFML. I am linking to static libraries.
Here are my settings:





Full error:
1>sfml-graphics-s-d.lib(GLExtensions.obj) : error LNK2019: unresolved external symbol _glewInit referenced in function "void __cdecl sf::priv::ensureExtensionsInit(void)" (?ensureExtensionsInit@priv@sf@@YAXXZ)
1>sfml-graphics-s-d.lib(GLExtensions.obj) : error LNK2019: unresolved external symbol _glewGetErrorString referenced in function "void __cdecl sf::priv::ensureExtensionsInit(void)" (?ensureExtensionsInit@priv@sf@@YAXXZ)

What is wrong ?

AlexAUT

  • Sr. Member
  • ****
  • Posts: 396
    • View Profile
Re: unresolved external symbol _glewInit
« Reply #1 on: April 11, 2015, 07:23:37 pm »
AFAIK you have to link glew-s.lib last because SFML depends on glew (the same reason why you link graphics "before" window -> system)

On a side note, the current source (master) of SFML does no longer use GLEW (glLoadGen)

AlexAUT

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10991
    • View Profile
    • development blog
    • Email
AW: unresolved external symbol _glewInit
« Reply #2 on: April 11, 2015, 09:05:24 pm »
With VS the linking order not important. However is your glew library really called glew32s.lib?
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

radiKal

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: unresolved external symbol _glewInit
« Reply #3 on: April 11, 2015, 09:55:36 pm »
The order doesn't seem to change anything.
Yes, my glew library is called glew32s.lib, look:


EDIT: sfml libs weren't compiled with the proper glew. It works now.
« Last Edit: April 15, 2015, 02:05:27 pm by radiKal »