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

Author Topic: GLEW warnings  (Read 1721 times)

0 Members and 1 Guest are viewing this topic.

GLS

  • Newbie
  • *
  • Posts: 16
    • View Profile
GLEW warnings
« on: May 12, 2014, 05:09:38 pm »
Hello! Sorry for my english. I use Google Translate.
I downloaded GLEW 1.10.0 and added path c:\glew\include in code::blocks Build options -> Search directories.
main.cpp
#define GLEW_STATIC
#include <GL/glew.h>
#include <SFML/Graphics.hpp>
//.............
int main()
{
    GLenum err = glewInit();
    if (GLEW_OK != err)
    {
        fprintf(stderr, "Error: %s\n", glewGetErrorString(err));
        return 1;
    }

    fprintf(stdout, "Status: Using GLEW %s\n", glewGetString(GLEW_VERSION));
    //..........
}
 
The application compiles, but a warnings is issued:
Warning: resolving _glewInit@0 by linking to _glewInit
Warning: resolving _glewGetString@4 by linking to _glewGetString
Warning: resolving _glewGetErrorString@4 by linking to _glewGetErrorString

Prompt please, what's the problem?

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10879
    • View Profile
    • development blog
    • Email
AW: GLEW warnings
« Reply #1 on: May 12, 2014, 05:27:15 pm »
SFML uses GLEW as well, thus the linker might issue a warning.

At best you could build SFML statically and link glew statically once (only possible with the latest SFML version from GitHib).
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

GLS

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: AW: GLEW warnings
« Reply #2 on: May 12, 2014, 05:42:36 pm »
SFML uses GLEW as well, thus the linker might issue a warning.
I know, in my application SFML linked statically and i not linked glew32.lib or glew32s.lib

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10879
    • View Profile
    • development blog
    • Email
Re: GLEW warnings
« Reply #3 on: May 12, 2014, 06:16:10 pm »
  • Get the latest SFML version from GitHub.
  • Build SFML statically.
  • Link SFML and SFML's dependencies.
  • Since SFML depends on GLEW, you'll have already linked against it.

Also define GLEW_STATIC in the project file and not in the source file.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/