我已经
#include <stdio.h>
#include <winsock.h>
#include <afx.h>
#include <string.h>
但编译报错:
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
#include <stdio.h>
#include <winsock.h>
#include <afx.h>
#include <string.h>
但编译报错:
c:\program files\microsoft visual studio\vc98\mfc\include\afxv_w32.h(14) : fatal error C1189: #error : WINDOWS.H already included. MFC apps must not #include <windows.h>
project->settings->general->microsoft foundation classes下
要选use MFC in a shared Dll
#include <afxwin.h>还要更改一下项目设置,Project -> Settings 在 C/C++ 面,在 Category 下拉框选择 CodeGeneration ,然后在 Use run-time library 选择 Debug Multithread ( debug 版)或者选择 Multithreaded (编译 release 版本程序时用)
弄混了
同意sgnaw(李逍遥)