Skip to main content
gamedev.net
🔒 Locked

sdl: compiler problem

Started by DrewSmug Apr 17, 2004 at 12:01 PM 3 replies 1.9k views
Original Post
DrewSmug
DrewSmug
hopefully this is the right place to post this question. i just recently decided to start learning sdl. i went to cone3d and started the first website and follewed the instructions to install or setup my compiler to use sdl. my problem is no matter what i always get this error when i try to build sdlmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol _SDL_main I am using visual c++ 6 i checked the folder with all the lib files and SDLmain is in there. so i''m not sure what else this error might mean. if anybody can help that would be awsome, thanks.
vaneger
vaneger
ok first every project you make has to be a win32 application (it may need to be a windows console application but im not sure which) i had that issue one time and it causes that error. if you are absolutly sure the project is the right type then make sure under project->settings->link add sdlmain.lib or sdl.lib to the list of libraries that are linked.

those are the two ways ive ever gotten that error and it should be an easy fix hope it helps.

[edited by - vaneger on April 17, 2004 1:23:05 PM]
Instruo
Instruo
Yes, it does have to be a win32 console app. Other than that, just make sure you have a void main() in your project and it should be okay (assuming your including the libraries, of course
"Game Programming" in an of itself does not exist. We learn to program and then use that knowledge to make games.
DrewSmug
DrewSmug
i hate to be helpless but i have done all the things you guys mentioned. "code generation" and "Multithread DLL" and i tried both win32 console app and win32 app. i still get the same two errors as always

sdlmain.lib(SDL_main.obj) : error LNK2001: unresolved external symbol _SDL_main
Debug/test06.exe : fatal error LNK1120: 1 unresolved externals

any others ideas out there
Ainokea
Ainokea
the main must be like this int main(int argc, char *argv[])

cannot just be int main()

______________With the flesh of a cow.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.