User forums > Help
C::B+SDL+undefined reference to 'WinMain@16'
SplinterOfChaos:
I was having an unbelievable time making my hard work compatible with computers other than the one it was compiled on with Visual Studio 9, so I thought I'd try the only attractive alternative. I just hope it's not taboo to make your first post a trouble shooting one here--but it's not likely I'll ever use this forum as more anyway.
I got my code to compile fine except this error:
mingw\lib\lib... undefined reference to 'WinMain@16'
Completely out of my hands. It registered all the right files, knew where to find them, knew what to do with them, why the hell did this happen? I'll give any info you guys think would be helpful to solve this problem.
wobien:
You have to enable full command-line logging in the build log (Settings->Compilor and Debugger->Other Settings (last tab)).
Then post the resulting build log.
mandrav:
--- Quote from: SplinterOfChaos on January 05, 2008, 08:43:42 am ---I was having an unbelievable time making my hard work compatible with computers other than the one it was compiled on with Visual Studio 9, so I thought I'd try the only attractive alternative. I just hope it's not taboo to make your first post a trouble shooting one here--but it's not likely I'll ever use this forum as more anyway.
I got my code to compile fine except this error:
mingw\lib\lib... undefined reference to 'WinMain@16'
Completely out of my hands. It registered all the right files, knew where to find them, knew what to do with them, why the hell did this happen? I'll give any info you guys think would be helpful to solve this problem.
--- End quote ---
Have you read the SDL article on our wiki? It's a bit dated but I doubt it has become invalid.
Specifically, check if you link to mingw32, SDL, and SDLmain libraries.
SplinterOfChaos:
That's how I got it to work in the first place.
It won't let me copy the contents to the clipboard still, but nothing has changed.
thomas:
I forgot what exactly was the cause/solution for this (having not used SDL for a loooooooooooong time), but it is a pretty well-known problem (or rather, feature). It has to do with the library's own main function and the defined preprocessor constants (which determine whether or not it implements one).
As far as I remember, there's just one preprocessor constant that you need to set, and it works fine. Look on the SDL site, there are a couple of similar issues and solutions to them.
Navigation
[0] Message Index
[#] Next page
Go to full version