[SDL] compile error under vc++ - unresolved external symbol
Salvatore Di Fazio
salvatore.difazio at gmail.com
Sat Jul 15 23:36:52 PDT 2006
Hello Albert,
the better way to work in vs2005 with the SDL is:
1 - Make a empty project
2 - copy all the precompilated libraries under
\Programmi\Microsoft Visual Studio 8\VC\lib
3 - copy all the headers files under
\Programmi\Microsoft Visual Studio 8\VC\include\SDL
4 - copy all the dll under:
C:\Windows\System32
5 - Set the project with the libraries that you will use:
Right-click on the project -> Options -> Linker -> Input:
SDLmain.lib SDL.lib etc.lib
Where you must insert SDLmain.lib SDL.lib, and the etc.lib are,
for example, SDL_image.lib, SDL_mixer.lib.
Albert Ridolfi ha scritto:
> Hello Peter,
>
> I was using the pre-compiled libraries, but now I have built them all by
> myself, and this didn't fix the problem.
>
> I modified just the main function and the signature, and removed #include
> "stdafx.h", now it is just int main()
>
> Yes, the libraries were added to the linker settings.
>
> The compiler output:
> main.obj : error LNK2019: unresolved external symbol _Mix_LoadWAV_RW
> referenced in function "int __cdecl SDL_main(void)" (?SDL_main@@YAHXZ)
> main.obj : error LNK2019: unresolved external symbol _SDL_RWFromFile
> referenced in function "int __cdecl SDL_main(void)" (?SDL_main@@YAHXZ)
> MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main
> referenced in function ___tmainCRTStartup
>
> Thanks for the help
> Albert
More information about the SDL
mailing list