Sign in to follow this  
Mastaba

Mysterious link warning popped up

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
This is just a drunken guess that's probably wrong, but did you get the "windows application/WinMain" and "console application/main" correct?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this