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++
- LINK : fatal error LNK1561: entry point must be defined ERROR IN VC++
- Win32 Console Application
- 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++
- How to convert string to char array in C++?
- How can I convert a std::string to int?
- Why is “using namespace std;” considered bad practice?
- ‘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
- How do I reverse a C++ vector?
- 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
- 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
- Error “C++ requires a type specifier for all declarations whilst defining methods”
- How to create a dynamically-allocated array of const objects, but have values assigned to them?
- C++ IDE with repl?
- error: use of deleted function
- Run C++ in command prompt – Windows
- pthread sleep linux
- 2D array vs array of arrays
- C++ error: definition of implicitly-declared
- RPN Calculator for C++
- What does `Fatal Python error: PyThreadState_Get: no current thread` mean?
- Debug Assertion Failed: _CrtIsValidHeapPointer(block)
- gdb error not in executable format: File format not recognized
- C++ Erase vector element by value rather than by position?
- C++ Class ‘undeclared identifier”
- Destructor for Binary Search Tree
- What is the most popular general purpose C++ framework?
- Adding message to assert
- c++ error: invalid types ‘int[int]’ for array subscript
- What are the different versions of exec used for in C and C++?
- 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
- C++ pass an array by reference
- 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++
- Unrecognizable template declaration/definition
- 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