小弟编的下载网页的程序
void main()
{FILE *fp1;
char url[200]="http://www.7dn.cn/Article/Class39/Class41/List_2.html";
fp1=fopen("download.txt","a"); CStdioFile *pf;
CInternetSession session;
int charCnt;
char buf[MAXBUF]; pf = session.OpenURL(url);
while(charCnt!=0)
{
charCnt = pf->Read(buf,MAXBUF);
buf[charCnt] = '\0';
fprintf(fp1,"%s\n",buf);
}
fclose(fp1);
}我的程序编译时候没错
但在build的时候有3个错误
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.达人们,是我的程序哪里错了
还有,如果我要下载网页的文本内容,应该怎么办??
void main()
{FILE *fp1;
char url[200]="http://www.7dn.cn/Article/Class39/Class41/List_2.html";
fp1=fopen("download.txt","a"); CStdioFile *pf;
CInternetSession session;
int charCnt;
char buf[MAXBUF]; pf = session.OpenURL(url);
while(charCnt!=0)
{
charCnt = pf->Read(buf,MAXBUF);
buf[charCnt] = '\0';
fprintf(fp1,"%s\n",buf);
}
fclose(fp1);
}我的程序编译时候没错
但在build的时候有3个错误
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
Debug/1.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.达人们,是我的程序哪里错了
还有,如果我要下载网页的文本内容,应该怎么办??
在工程设置的 C/C++页内,
Category 切换到 "Code Generation"Use run-time library 选择 Debug Multithreaded DLL (调试版) , Multithreaded DLL(发行版)
程序运行起来还是有错误
分先送上了,其他达人再帮帮忙
CInternetSession session;这一行出错(编译和build时都没有错误,运行时才出现)错误是:
Loaded 'ntdll.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\kernel32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\advapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\rpcrt4.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\gdi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\user32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\wininet.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\crypt32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msvcrt.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msasn1.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\oleaut32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ole32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shlwapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\winspool.drv', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\comdlg32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\shell32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\imm32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\lpk.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\usp10.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\nview.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\psapi.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\version.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\olepro32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\ddraw.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\dciman32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\nvwrszhc.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msctf.dll', no matching symbolic information found.
Loaded 'C:\Program Files\3721\helper.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\Downloaded Program Files\CnsMin.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\netapi32.dll', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\msctfime.ime', no matching symbolic information found.
Loaded 'C:\WINDOWS\system32\nviewimg.dll', no matching symbolic information found.
The thread 0x494 has exited with code 3 (0x3).
The program 'D:\Downloads\毕设\programe\asdfa\Debug\2.exe' has exited with code 3 (0x3).
望达人出来解释,谢谢了