Monday, August 30, 2021

Error LNK 2001 unresolved external symbol _mainCRTStartup

Error LNK 2001 unresolved external symbol _mainCRTStartup

  1. “LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup”
  2. Unbelievable:I found the problem! It was an incredibly simple thing what was causing this criptic error: A "SPACE"

    It turns out that under Configuration->C/C++->OutputFiles->Object File Name: I had: "$(IntDir)\ ".

    Open up your project's settings page, go to Linker → System and examine the SubSystem property. Make sure it's set to the same value in all project configurations by switching the configuration from the configuration drop-down box.

    Assuming that your intended entry point is main (or one of its variants such as _tmain or wmain), you want to make sure to use the SubSystem property is set to CONSOLE.

    WinMain as entry point is missing.

    Just added /NODEFAULTLIB and /ENTRY:WinMain@16 to Linker->CommandLine->Additional Options. Recompiled and got the same error. I also went ahead and parsed the VC project file into separate text files for "release/wi32" and "release/x64", and then compared the 2 files with Kdiff3. Both files look the same, exept for "Name", "target machine", "output directory", etc. (properties that obviously change from mode to mode).

  3. Help me fix error: "error LNK2001: unresolved external symbol _main"
  4. Help me fix error: "error LNK2001: unresolved external symbol _main".

  5. This is a paragraph.

  6. This is a paragraph.

  7. This is a paragraph.

  8. This is a paragraph.

  9. This is a paragraph.

  10. This is a paragraph.

  11. This is a paragraph.

  12. This is a paragraph.

  13. This is a paragraph.

  14. This is a paragraph.

  15. This is a paragraph.

  16. This is a paragraph.

  17. This is a paragraph.

  18. This is a paragraph.

  19. This is a paragraph.

  20. This is a paragraph.

No comments:

Post a Comment