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

Author Topic: Tutorial - SFML using OpenGL error  (Read 6707 times)

0 Members and 1 Guest are viewing this topic.

LionMX

  • Newbie
  • *
  • Posts: 5
    • View Profile
Tutorial - SFML using OpenGL error
« on: February 18, 2010, 07:20:29 pm »
I have no doubt I have done something stupid here:

Code: [Select]
1>------ Rebuild All started: Project: SFML-Window, Configuration: Debug Win32 ------
1>Deleting intermediate and output files for project 'SFML-Window', configuration 'Debug|Win32'
1>Compiling...
1>Main.cpp
1>Compiling manifest to resources...
1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0
1>Copyright (C) Microsoft Corporation.  All rights reserved.
1>Linking...
1>Main.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glVertex3f@12 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol "public: float __thiscall sf::Clock::GetElapsedTime(void)const " (?GetElapsedTime@Clock@sf@@QBEMXZ) referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol _gluPerspective@32 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glDepthMask@4 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function _main
1>Main.obj : error LNK2019: unresolved external symbol "public: __thiscall sf::Clock::Clock(void)" (??0Clock@sf@@QAE@XZ) referenced in function _main
1>F:\Programming\Programs\SFML-Using OpenGL\Debug\SFML-Window.exe : fatal error LNK1120: 16 unresolved externals
1>Build log was saved at "file://f:\Programming\Programs\SFML-Using OpenGL\Debug\BuildLog.htm"
1>SFML-Window - 17 error(s), 0 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========


So, I copied the code exactly from the tutorial, I put sfml-window-d.lib in the linker box and the window-d.dll in the project folder. To me it looks like its not detecting OpenGL but in the tutorial it sais this should be sorted automatically.

If it helps i'm using Windows 7 x64 and VS 2008. Please help!

panithadrum

  • Sr. Member
  • ****
  • Posts: 304
    • View Profile
    • Skyrpex@Github
    • Email
Tutorial - SFML using OpenGL error
« Reply #1 on: February 18, 2010, 07:29:16 pm »
You forgot to link to opengl32.lib and/or glut32.lib.

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Tutorial - SFML using OpenGL error
« Reply #2 on: February 18, 2010, 07:30:44 pm »
And sfml-system.
Laurent Gomila - SFML developer

LionMX

  • Newbie
  • *
  • Posts: 5
    • View Profile
Tutorial - SFML using OpenGL error
« Reply #3 on: February 18, 2010, 08:53:42 pm »
Thanks for the prompt reply.

sfml-window-d.lib
sfml-system-d.lib  
opengl32.lib
glu32.lib

Those were the ones I needed. Great help thanks again :-)


Keep up the good work!

 

anything