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

Author Topic: Window Tutorial Troubles  (Read 7957 times)

0 Members and 1 Guest are viewing this topic.

Gio

  • Newbie
  • *
  • Posts: 16
    • View Profile
Window Tutorial Troubles
« on: May 24, 2010, 11:16:13 pm »
I am using the Window function tutorial in the version 1.6 tutorial with Microsoft Visual C++ Express 2010, and added the needed dependencies and the other setup things mentioned in the 1st tutorial. However, when I try to compile, I get this Build Message:
Code: [Select]
1>------ Build started: Project: SFML Test2, Configuration: Debug Win32 ------
1>  stdafx.cpp
1>  SFML Test2.cpp
1>MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
1>C:\Users\Gio\Desktop\Documents\C++ Programs\Tests\SFML Test2\Debug\SFML Test2.exe : fatal error LNK1120: 1 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

How do I fix this error? Any help would be greatly appreciated.[/code]
~~Gio~~

Ashenwraith

  • Sr. Member
  • ****
  • Posts: 270
    • View Profile
Window Tutorial Troubles
« Reply #1 on: May 24, 2010, 11:39:19 pm »
Assuming you did everything correct, did you recompile for 2010?

The two downloads are for 2005 or 2008

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Window Tutorial Troubles
« Reply #2 on: May 24, 2010, 11:40:44 pm »
You forgot to link to sfml-main.lib.
Laurent Gomila - SFML developer

Gio

  • Newbie
  • *
  • Posts: 16
    • View Profile
Window Tutorial Troubles
« Reply #3 on: May 26, 2010, 02:15:39 am »
It compiled fine. I tried replacing the code with the OpenGL tutorial code, however, (to save adding dependencies) but got another problem, even with the 3 dependencies added.
Build Message:
Code: [Select]
1>------ Build started: Project: SFML Test2, Configuration: Debug Win32 ------
1>  SFML Test2.cpp
1>MSVCRTD.lib(cinitexe.obj) : warning LNK4098: defaultlib 'msvcrt.lib' conflicts with use of other libs; use /NODEFAULTLIB:library
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glEnd@0 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glVertex3f@12 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glBegin@4 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glRotatef@16 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glTranslatef@12 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glClear@4 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glViewport@16 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol _gluPerspective@32 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glLoadIdentity@0 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glMatrixMode@4 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glDepthMask@4 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glEnable@4 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glClearColor@16 referenced in function _main
1>SFML Test2.obj : error LNK2019: unresolved external symbol __imp__glClearDepth@8 referenced in function _main
1>C:\Users\Gio\Desktop\Documents\C++ Programs\Tests\SFML Test2\Debug\SFML Test2.exe : fatal error LNK1120: 14 unresolved externals
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

I am sorry for the inconvenience. :?
~~Gio~~

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Window Tutorial Troubles
« Reply #4 on: May 26, 2010, 09:35:47 am »
You have to link to opengl32.lib and glu32.lib.
Laurent Gomila - SFML developer

 

anything