Click here to Skip to main content
13,504,533 members
Rate this:
Please Sign up or sign in to vote.
See more:
warning LNK4067: ambiguous entry point; selected 'mainCRTStartup'
Posted 29-Jan-13 13:57pm
Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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:[^].

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:[^].


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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web04 | 2.8.180417.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100