Opengl + SDL linking error
- by me2loveit2
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:
1Build started 10/20/2012 12:09:17 AM.
1InitializeBuildStatus:
1 Touching "Debug\texture mapping test.unsuccessfulbuild".
1ClCompile:
1 All outputs are up-to-date.
1 texture mapping test.cpp
1ManifestResourceCompile:
1 All outputs are up-to-date.
1texture mapping test.obj : error LNK2019: unresolved external symbol _IMG_Load referenced in function "void __cdecl display(void)" (?display@@YAXXZ)
1MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol main referenced in function __tmainCRTStartup
1C:\Users\Me\Documents\Visual Studio 2010\Projects\Programming projects\texture mapping test\Debug\texture mapping test.exe : fatal error LNK1120: 2 unresolved externals
1
1Build FAILED.
1
1Time 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