码迷,mamicode.com
首页 > 其他好文 > 详细

Introduction / Getting Started

时间:2016-04-05 22:50:27      阅读:227      评论:0      收藏:0      [点我收藏+]

标签:

Debug and Release

The debug configuration is designed to help you debug your program, and is generally the one you will use when developing your programs. This configuration turns off all optimizations, and includes debugging information, which makes your programs larger and slower, but much easier to debug. The debug configuration is usually selected as the active configuration by default.

 

The release configuration is designed to be used when releasing your program to the public. This version is typically optimized for size and performance, and doesn’t contain the extra debugging information.

 

Rule: Use the debug configuration when developing your programs. When you’re ready to release your executable to others, build it using the release configuration.

 

Common errors

Problem :When I compile my program in Visual Studio 2010, I get an error message about a COFF file being invalid. How do I fix this?

Answer : If you see the following error when compiling with Visual Studio 2010:

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

You’ve encountered a Microsoft OS/compiler incompatibility. It has nothing to do with your code.

The best first option is to download and install Visual Studio 2010 Service Pack 1.

If that does not fix your issue, there are many other good suggestions on this Stack Overflow thread about the various causes and solutions to this problem.

 

Problem : When I compile my program, I get an error about unresolved external symbol _main or _WinMain@16

Answer : This means your compiler can’t find your main() function. All programs must include a main() function.

There are a few things to check:

a) Does your code include a function named main?

b) Is main spelled correctly?

c) Is the file containing main part of your project?

d) Is the file containing function main set to compile?

 

Problem: I’m using Visual Studio and get the following error: “1>MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function “int __cdecl invoke_main(void)” (?invoke_main@@YAHXZ)”

Answer : Most likely you’ve created the wrong type of project. Make sure you’re creating a Win32 Console Application, not a Win32 Project.

 

错误查找网址http://stackoverflow.com/

 

Introduction / Getting Started

标签:

原文地址:http://www.cnblogs.com/mbsn/p/5357036.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!