一、无法解析的外部符号 _WinMain@16,该符号在函数 ___tmainCRTStartup 中被引用
这个错误我遇到过几次了,按照《Window核心编程》提供的方法——修改/SUBSYSTEM:CONSOLE或是SUBSYSTEM:WINDOWS——还是没有。确切地说,前阵子有用,后来发现没用了!
如代码:
#include <windows.h>
#include <stdlib.h>
//#include <tchar.h>
#include <strsafe.h>
//#include "../CreateDll/MyLib.h"
int WINAPI _tWinMain( HINSTANCE, HINSTANCE, PTSTR, int)
//int _tmain( int argc, TCHAR *argv[], TCHAR *envp[] )
//int _tmain()
{
int nLeft = 10, nRight = 25;
TCHAR sz[100];
/*
StringCchPrintf( sz, _countof(sz), TEXT("%d + %d = %d"), nLeft, nRight, Add( nLeft, nRigh

本文总结了VS2008编译链接时常见的错误及其解决方法,包括_tmain与_tWinMain函数签名不匹配、项目依赖设置、MFC应用与CRT版本冲突、源代码调试问题以及DLL缺失等,并提供了相应的解决方案。
最低0.47元/天 解锁文章
2750





