自己创建的win32工程,想在里面用到CString、CTime等类。现在就把自己的做法说说:(我用的是vs2008)
一、首先在工程->属性中,找到configuration properties->general->use of MFC 选择use MFC in a shared DLL .
二、在language中,将openMP support改为Yes(/openmp)。
好像这里还是不行。
如果你的项目中没有stdafx.h和stdafx.cpp。请自己建立,然后在stdafx.h中加入
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__36092BC5_F81F_4FA9_A0C3_46569DFF8201__INCLUDED_)
#define AFX_STDAFX_H__36092BC5_F81F_4FA9_A0C3_46569DFF8201__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MF