用什么用AFX.H总是出错? #include "afx.h:#include "stdio.h"#include "iostream.h"main(){.......}运行第一次OK,运行第二次就出了三个什么未解决的符号等什么? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 程序就这样也出错main(){ int x=1,y=1; cout<<"fdsa"<<x<<y;}这样也出错把#include "afx.h"删了就不会了 #include "afx.h"这句放到最后,即:#include "stdio.h"#include "iostream.h"#include "afx.h"就好了吧! nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadexnafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadexDebug/phone.exe : fatal error LNK1120: 2 unresolved externals老是出现上面这几条错误,请高手救急 trycl /MD your.cppfor example, testafx.cpp:#include <afx.h>#include <stdio.h>#include <iostream.h>int main(){ printf("C-Style:hello world!\n"); cout<<"C++ Style:hello world" << endl; ::MessageBox(NULL,"Hello world!","Windows Style",MB_OK); return 0;}E:\>vcvars32E:\>cl /MD testafx.cpp 不好意思,我前面发的帖子忘了说楼上这条了,所以你需要结合使用,即:在Visual Studio的 Project/Setting/ c/c++ / code generation中设置debug multithread(对应Debug版本)或者multithread(对应Release版本)。然后顺序按照上面说的即可。 我用VC++写的,在"工程"中的"设置"是灰色的,不可以设是DEBUG还是RELEASE还有写完为什么要在DOS下写那句vcvars32和cl /md testafx.cpp,有什么用?还请大师指点. my example assumes you are doing command-line compilation. vcvars32.bat sets up all the environment variables needed for visual c++ compiler (cl.exe). /MD is a compiler option 有关微软网站上的sample applications 这儿有几个不错的 VC入门教程 问一个 XP系统下重绘标题栏的问题 如何给Win32 DLL添加MFC支持?(Dllmain重定义的问题) 关于SendMessage的问题 哪位大侠有关于智能指针的资料 MFC DLL工程编译出错,很有普遍性!请大家帮助 有个问题希望大家来讨论一下?关于delphi有些控件没句柄是如何实现的?vc中能自己实现吗? 如何获得汉字的内码? 关于VC读写usb外设的问题 初学者的对话框问题。 我写了一个通用软件,保存设置不知是用注册表好还是INI文件好???
main()
{ int x=1,y=1;
cout<<"fdsa"<<x<<y;
}
这样也出错把#include "afx.h"删了就不会了
#include "iostream.h"
#include "afx.h"就好了吧!
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/phone.exe : fatal error LNK1120: 2 unresolved externals
老是出现上面这几条错误,请高手救急
cl /MD your.cppfor example, testafx.cpp:#include <afx.h>
#include <stdio.h>
#include <iostream.h>int main()
{
printf("C-Style:hello world!\n");
cout<<"C++ Style:hello world" << endl;
::MessageBox(NULL,"Hello world!","Windows Style",MB_OK);
return 0;
}E:\>vcvars32
E:\>cl /MD testafx.cpp
还有写完为什么要在DOS下写那句vcvars32和cl /md testafx.cpp,有什么用?
还请大师指点.