luke Member Posts: 311 From: I use your computer as my second Linux box Registered: 10-30-2005 |
Hey, I am working on a simple game framework that will use SDL and DX build in .NET. I am having a mysterious problem though. (I am follow Richard Fines tutorial on GameDev.net) I am getting a LNK2019 error {MSDN is/was less than helpful as normal} I have commented out/removed several files from the project and I still get this error, I am pretty sure that I am linking / including all the necessary libraries but you never know he he. Here is the exact error code: "error: LNK2019: unresolved external symbol _main referenced in function _mainCRTStartup" next line: "fatal error: LNK1120: 1 unresolved externals" I know that there are no _main or _mainCRTStartup methods in my code (theyre probably in SDL somewhere) The only main I have is the "main(int argc, char **argv). ------------------ |
buddboy Member Posts: 2220 From: New Albany, Indiana, U.S. Registered: 10-08-2004 |
well, are you using the exact same IDE and version? also check the update date on the article... whenever i've used SDL and such, it's constantly buggered up by using a different article or old code. ------------------
RADIOACTIVE IE AHEAD! int name() |
luke Member Posts: 311 From: I use your computer as my second Linux box Registered: 10-30-2005 |
I worked on this project for several weeks and it has multiple files in it. It only stopped linking successfully when I got to work on the profilers(code timers) and now even after I comment out/delete the file from the project it still doesn't work the profiler used an SDL function to get the time. ------------------ |
Jari Member Posts: 1471 From: Helsinki, Finland Registered: 03-11-2005 |
I've had similar problem if not the same, you need proper main function. Are you using SDLMain? Dont forget to link with the sdlmain.lib if you are. ------------------ [VoHW] (Help needed) [Blog] - Truedisciple (mp3) |
luke Member Posts: 311 From: I use your computer as my second Linux box Registered: 10-30-2005 |
Thanks Jari, I rechecked all of my settings and golly I really *wasn't* linking the proper libs (I swear that I don't know how I managed to do that after I set it up the first time lol) although I tried using the standard SDL main(int argv, char** argc) which wouldn't compile so I went with the normal main() and it compiles now (yay!) lesson learned: check your settings often! ------------------ |