Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C++
warning LNK4067: ambiguous entry point; selected 'mainCRTStartup'
Posted 29-Jan-13 14:57pm
Rate this: bad
good
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.
  Permalink  
Rate this: bad
good
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: 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
  Permalink  

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

  Print Answers RSS
0 Zoltán Zörgő 220
1 Peter Leow 160
2 CPallini 120
3 Sergey Alexandrovich Kryukov 95
4 BillWoodruff 85
0 Sergey Alexandrovich Kryukov 9,428
1 OriginalGriff 6,901
2 Peter Leow 4,737
3 Zoltán Zörgő 4,349
4 CHill60 2,932


Advertise | Privacy | Mobile
Web04 | 2.8.150129.1 | Last Updated 29 Jan 2013
Copyright © CodeProject, 1999-2015
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