Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using afx.h for the CString class 1

Status
Not open for further replies.

chpicker

Programmer
Apr 10, 2001
1,316
I'm fairly new at C++ and trying to learn a little bit at a time. I need the ability to create dynamic strings (strings that can change length during program execution), and don't feel comfortable writing my own string class yet, so I did a search through MSDN and found the CString class, which looks like it would suit my needs. According to the help file, I need to #include <afx.h> in order to use it. However, the simple act of putting this line at the beginning of my program causes the linker to give the following errors:
Code:
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex
This doesn't happen to me if I #include the header file in a blank C++ program (
Code:
void main(){return;}
), so it must have something to do with my actual program. Any suggestions?
 
to use mfc, you must set your project settings to use MFC or to create MFC project John Fill
1c.bmp


ivfmd@mail.md
 
Ahh...so just including select libraries doesn't work, huh?
 
You should include nothing. You must change your project->settings in using MFC choose use MFC as a shared... or ose MFC as a dinnamically... John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top