Click here to Skip to main content
15,893,668 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
warning LNK4067: ambiguous entry point; selected 'mainCRTStartup'
Posted

One of two things is going on here.

1 You have a function in your code called mainCRTStartup which is clashing with the one from the CRuntime/Clibrary. This function is the entry point where your program really starts executing, way before main.

2 Much more likely you're linking to 2 different copies of the C Library e.g. LIBCMTD and MSVCRT80, one static and one dynamic. If this is the case you should be getting lots of other warnings and errors as well giving clues as to what is wrong.

If you need further help you'll probably have to give more details.
 
Share this answer
 
It happens when you try to build an application (normally, .EXE). Entry point means your "main" function used by OS to start your application when it is loaded. It is indicated in few different ways, and, in some situations, more then one functions satisfy the criteria for being an entry point. For Microsoft systems, it is described here: http://msdn.microsoft.com/en-us/library/f9t8842e%28v=vs.110%29.aspx[^].

You have your project; see by yourself where you could define a redundant entry point. Chances are, it happens after you got someone's code and modified it without full understanding. This is warning, not error, but you should work without any warnings. In this very case, the function mainCRTStartup is likely not what you meant to use.

See also:
http://en.wikipedia.org/wiki/Main_function[^].

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900