Mysterious link warning popped up

Started by
1 comment, last by Mastaba 17 years, 6 months ago
I found an old VC++ 5.0 project of mine, and decided to refresh and rebuild it with VC++ 2005. At first I simply tried to convert the project space into a new solution, but VC++ 2005 kept crashing everytime I tried to convert it. So then I decided to simply create a new project and add all the files manually. After replacing the Direct3D8 code with Direct3D9 code, and fixing all the deprecation warnings, I build it and get presented with the following warning:

LINK : warning LNK4067: ambiguous entry point; selected 'WinMainCRTStartup'
Now, I'm confused, why was it ambiguous? These are the only additional libraries I told the linker to import: d3d9.lib d3dx9d.lib dsound.lib dinput8.lib dxguid.lib dxerr9.lib ws2_32.lib comctl32.lib, and I told it to use the multithreaded DLL runtime. I can remove the warning by explicitly setting WinMainCRTStartup as the entry point, but I've never had to do that before, and it leaves a bad taste in my mouth. Any ideas as to the origin of this warning?
.
Advertisement
This is just a drunken guess that's probably wrong, but did you get the "windows application/WinMain" and "console application/main" correct?
I found the problem, and it was embarrassingly trivial. [embarrass] When I created the project, I did not select 'empty project'. And when I added all the files, the ones created by the wizard were sort of hidden amongst them and I never noticed them. So I ended up having a WinMain from the old project, which I was well aware of and a wWinMain from the wizard provided code, which I totally overlooked.
.

This topic is closed to new replies.

Advertisement