How am I getting this error
error LNK2001: unresolved external symbol _WinMain@16
I deleted a function prototype in one of my headers which I no longer needed, and then I started getting that error. Hmmm
How am I getting this error
error LNK2001: unresolved external symbol _WinMain@16
I deleted a function prototype in one of my headers which I no longer needed, and then I started getting that error. Hmmm
What compiler are you using? Usually when people are writing Win32 app's for the first time they will get that error but with external symbol _main. This is because they are trying to make the Win32 program using a console project in M$VC. So I would assume you don't have WinMain correctly declared or one of your project options got tinkered with?Originally posted by Shadow12345
How am I getting this error
error LNK2001: unresolved external symbol _WinMain@16
I deleted a function prototype in one of my headers which I no longer needed, and then I started getting that error. Hmmm
Check out the Forgers programming tutorial, it has FAQ for this kind of question with several solutions:
http://www.winprog.org/tutorial/index.html
- Sean
If cities were built like software is built, the first woodpecker to come along would level civilization.
Black Frog Studios
read the forger site, but to sum it up its like this:
you are trying to call a function that is contained in another module other than what modules and libraries you are currently linked to.
the most common error, said forger's site, is trying to compile a win32 app with a "console project" like sean said.
or trying to compile a console program and didn't properly write or compile the main() function.
if you're using VC++ re-create your project with a win32 project, not console.
if you're using BC++ it says to use -tW however i don't know what thats all about because i use VC++.
it also said it can happen if you try and compile a BC++ program from the command line and dont specify the correct parameters to tell it that its a win32 app.
btw, did it run fine before you changed the code?
yes it ran fine before i changed my code
I deleted eveverything except the source workspace and data files and rebuilt the project and that solved the problem