Opengl + SDL linking error
Posted
by
me2loveit2
on Game Development
See other posts from Game Development
or by me2loveit2
Published on 2012-10-20T04:33:58Z
Indexed on
2012/10/20
5:22 UTC
Read the original article
Hit count: 236
sdl
I am trying to load an image as a texture with opengl using c++ in visual studio 2010. I researched a couple hours online and found the SDL library, then I implemented a simple example and got some linking error I can not seem to figure out. The error log is here:
1>Build started 10/20/2012 12:09:17 AM.
1>InitializeBuildStatus:
1> Touching "Debug\texture mapping test.unsuccessfulbuild".
1>ClCompile:
1> All outputs are up-to-date.
1> texture mapping test.cpp
1>ManifestResourceCompile:
1> All outputs are up-to-date.
1>texture mapping test.obj : error LNK2019: unresolved external symbol _IMG_Load referenced in function "void __cdecl display(void)" (?display@@YAXXZ)
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol main referenced in function __tmainCRTStartup
1>C:\Users\Me\Documents\Visual Studio 2010\Projects\Programming projects\texture mapping test\Debug\texture mapping test.exe : fatal error LNK1120: 2 unresolved externals
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:02.45
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========
Can someone please help me!! I am at a desperate point right now.
I downloaded the SDL, and copied all the .h file into: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include I added the .lib (x86) files into://as a not i tried the (x64) file too but got the exact same error C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Lib and the .dll(x86) into: C:\Windows\System32
For implementing textures, I used the simple sample code from: http://www.sdltutorials.com/sdl-tip-sdl-surface-to-opengl-texture
Please let me know if you can see me doing something wrong, or know how I can fix this!!
Thanks
Phil
© Game Development or respective owner