Even if your project has a main()
method, the linker sometimes gets confused. You can solve this issue in Visual Studio 2010 by going to
Project -> Properties -> Configuration Properties -> Linker -> System
and changing SubSystem
to Console.
More Related Contents:
- How does the compilation/linking process work?
- What happens to global and static variables in a shared library when it is dynamically linked?
- Linking static libraries to other static libraries
- g++ undefined reference to typeinfo
- GCC C++ Linker errors: Undefined reference to ‘vtable for XXX’, Undefined reference to ‘ClassName::ClassName()’
- Is it safe to link C++17, C++14, and C++11 objects
- What is __gxx_personality_v0 for?
- Altering DLL search path for static linked DLL
- How can I statically link standard library to my C++ program?
- g++ linking order dependency when linking c code to c++ code
- Linking a shared library with another shared lib in linux
- Compilation fails with “relocation R_X86_64_32 against `.rodata.str1.8′ can not be used when making a shared object”
- gcc: undefined reference to
- Where do object file “Version References” come from?
- error LNK2038: mismatch detected for ‘_ITERATOR_DEBUG_LEVEL’: value ‘0’ doesn’t match value ‘2’ in main.obj
- Libraries in /usr/local/lib not found
- Linking Libraries in Xcode
- Unresolved external symbol LNK2019
- How to use OpenSSL with GCC?
- When should I write the keyword ‘static’ before a non-member function?
- C++ template, linking error [duplicate]
- Replacing ld with gold – any experience?
- cmake find_package specify path
- error LNK2005: xxx already defined in MSVCRT.lib(MSVCR100.dll) C:\something\LIBCMT.lib(setlocal.obj)
- Undefined reference to `stdscr’ while using ncurses
- library is linked but reference is undefined
- C++ Linker Error With Class static constexpr
- Windows & C++: extern & __declspec(dllimport)
- C++ linking error after upgrading to Mac OS X 10.9 / Xcode 5.0.1
- Why is there no multiple definition error when you define a class in a header file?