Is this a console program project or a Windows project? I’m asking because for a Win32 and similar project, the entry point is WinMain()
.
- Right-click the Project (not the Solution) on the left side.
- Then click Properties -> Configuration Properties -> Linker -> System
If it says Subsystem Windows
your entry point should be WinMain(), i.e.
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPWSTR lpCmdLine, int nShowCmd) { your code here ... }
Besides, speaking of the comments. This is a compile (or more precisely a Link) error, not a run-time error. When you start to debug, the compiler needs to make a complete program (not just to compile your module) and that is when the error occurs.
It does not even get to the point being loaded and run.
Related Posts:
- Unresolved external symbol in object files
- Unresolved external symbol in object files
- Windows 7 exception code: 0xc0000409
- VC++ fatal error LNK1168: cannot open filename.exe for writing
- VC++ fatal error LNK1168: cannot open filename.exe for writing
- LINK : fatal error LNK1561: entry point must be defined ERROR IN VC++
- Win32 Console Application
- LINK : fatal error LNK1561: entry point must be defined ERROR IN VC++
- error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
- Download c++ in existing visual studio 2017
- module unsafe for SAFESEH image C++
- How to use _CRT_SECURE_NO_WARNINGS
- Remove secure warnings (_CRT_SECURE_NO_WARNINGS) from projects by default in Visual Studio
- Difference between ‘strcpy’ and ‘strcpy_s’?
- wntdll.pdb not loaded – Can’t see the exception
- wntdll.pdb not loaded – Can’t see the exception
- Cannot open include file: ‘stdio.h’ – Visual Studio Community 2017 – C++ Error
- Exception Error c0000005 in VC++
- Missing vc_runtimeminimum_x86.msi and installation won’t work
- Visual Studio debugger error: Unable to start program Specified file cannot be found
- The #include
exists, but I get an error: identifier “cout” is undefined. Why? - Identifier is undefined
- CMake error at CMakeLists.txt:30 (project): No CMAKE_C_COMPILER could be found
- Error C1083: Cannot open include file: ‘stdafx.h’
- “The system cannot find the file specified” when running C++ program
- Cannot open Windows.h in Microsoft Visual Studio
- android,
android-layout,
android-linearlayout,
gradient, - https://stackoverflow.com/questions/3865946/error-generic-array-creation
- C++ Compiler Error C2280 “attempting to reference a deleted function” in Visual Studio 2013 and 2015
- error C2601: ‘main’ : local function definitions are illegall – MS VS 2013 Compiler
- cin.eof() functionality
- error LNK2019: unresolved external symbol “” referenced in function
- LPCSTR, LPCTSTR and LPTSTR
- Difference between
and - How to install Visual Studio Build Tools 2010 on Visual Studio 2015 Community?
- Does WPF Work with C++?
- How to fix the error “Windows SDK version 8.1” was not found?
- ERROR C2039: ‘vector’: is not a member of ‘std’
- Unexpected end of file error
- Pause Console in C++ program
- Why the switch statement cannot be applied on strings?
- How to dynamically allocate arrays in C++
- ‘was not declared in this scope’ error
- Good input validation loop using cin – C++
- C++ for each, pulling from vector elements
- How do I erase an element from std::vector<> by index?
- Incomplete Type Is Not Allowed
- how to implement quick sort algorithm in C++
- C++ Vector of pointers
- ‘cannot find or open the pdb file’ Visual Studio C++ 2013
- What is uintptr_t data type
- const int = int const?
- Undefined reference to vtable
- In C++, what is a virtual base class?
- Difference between const reference and normal parameter
- unsigned int vs. size_t
- How do I clear a C++ array?
- error: expected primary-expression before ‘)’ token (C)
- What does -> mean in C++?
- How to pass optional arguments to a method in C++?
- How to copy a string of std::string type in C++?
- C++ forbids converting a `string` constant to `char*` – Alphabets to Morse converting program
- What is activation record in the context of C and C++?
- Static array vs. dynamic array in C++
- C++ terminate called after throwing an instance of ‘std::out_of_range’ Simple Averaging code
- Returning an empty string : efficient way in c++
- How to find the size of an int[]?
- Append an int to a std::string
- Decimal to hex conversion c++ built-in function
- C++ IDE with repl?
- error: use of deleted function
- Run C++ in command prompt – Windows
- pthread sleep linux
- 2D array vs array of arrays
- Reading from .txt file into two dimensional array in c++
- C++ Error ‘nullptr was not declared in this scope’ in Eclipse IDE
- C++ Simple hangman game
- Remove First and Last Character C++
- C++ Convert string (or char*) to wstring (or wchar_t*)
- Program received signal SIGSEGV, Segmentation fault
- Integer to hex string in C++
- Comparison of C++ unit test frameworks
- What is the difference between .cc and .cpp file suffix?
- C++ error: object of abstract class type is not allowed: pure virtual function has no overrider
- Reading data from file into an array
- Trying to use int in getline
- c++ error c2015: too many characters in constant
- Splitting a C++ std::string using tokens, e.g. “;”
- Py_Initialize fails – unable to load the file system codec
- Using G++ to compile multiple .cpp and .h files
- How to do std::string indexof in C++ that returns index of matching string?
- variable or field declared void
- Invalid conversion from ‘char’ to ‘const char *’
- How do I deal with “signed/unsigned mismatch” warnings (C4018)?
- Creating folders in C++
- C++ equivalent of StringBuffer/StringBuilder?
- heap corruption detected | C++
- Update g++ but still old version
- Why are there two different getline() functions (if indeed there are)?
- Whats the difference between UInt8 and uint8_t