-
Using CfileFind and it will not link
#include <stdio.h>
#include <iostream.h>
#include <fstream.h>
#include <stdlib.h>
#include <string.h>
#include <afx.h>
//#define macros here
main(){
char name[20]="";
CFileFind finder;
BOOL bWorking = finder.FindFile("*.*");
while (bWorking)
{
bWorking = finder.FindNextFile();
cout << (LPCTSTR) finder.GetFileName() << endl;
}
return 1;
}
When I try to build an executable the program gives me the following errors
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
I am using Microsoft Visual 5.0 C++
What do I need to do I have tried for two days to make this work the sample code comes directly from the help file.
-
of Zen Hall
I'm not sure of the exact settings for MSVC 5.0, but you need to link with the multi-threaded libraries (something like project/settings,c/c++ tab, code generation) and specifiy in your project settings that you are using MFC (either using the dll's or static library).
Popular pages
Recent additions