Click here to Skip to main content
15,923,789 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: hot to do setting for complier?? Pin
sunit525-Nov-05 20:03
sunit525-Nov-05 20:03 
GeneralRe: hot to do setting for complier?? Pin
vikas amin25-Nov-05 20:38
vikas amin25-Nov-05 20:38 
AnswerRe: hot to do setting for complier?? Pin
Rajesh R Subramanian26-Nov-05 0:07
professionalRajesh R Subramanian26-Nov-05 0:07 
QuestionDetecting DLL Load failure Pin
Chintoo72325-Nov-05 18:30
Chintoo72325-Nov-05 18:30 
AnswerRe: Detecting DLL Load failure Pin
Michael Dunn25-Nov-05 18:43
sitebuilderMichael Dunn25-Nov-05 18:43 
AnswerRe: Detecting DLL Load failure Pin
Joel Lucsy27-Nov-05 8:57
Joel Lucsy27-Nov-05 8:57 
GeneralRe: Detecting DLL Load failure Pin
Chintoo72327-Nov-05 15:44
Chintoo72327-Nov-05 15:44 
QuestionMFC vs Standard Microsoft Libraries? Pin
newbie534525-Nov-05 17:56
newbie534525-Nov-05 17:56 
I am trying to incorporate headers from one program into another. The host program compiles fine until I add my stdafx.h which includes:

#include afxwin.h // MFC core and standard components
#include afxext.h // MFC extensions
#include afxdisp.h // MFC Automation classes
#include afxdtctl.h // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include afxcmn.h
//(syntax edited for posting)

it then generates errors such as these in which there seems to be an ambiguity between winsock.h and winsock2.h:

c:\Documents and Settings\Brenaman\Desktop\UAV Simulator\use\SourceCode\use_ios\Globals\globals_socket_ext.h(13): error C2146: syntax error : missing ';' before identifier 'socketData'

c:\Documents and Settings\Brenaman\Desktop\UAV Simulator\use\SourceCode\use_ios\Globals\typedefs.h(41): error C2501: 'gameport::capability' : missing storage-class or type specifiers

c:\Documents and Settings\Brenaman\Desktop\UAV Simulator\use\SourceCode\use_ios\Globals\globals_socket_ext.h(15): error C2501: 'recvSockAddr' : missing storage-class or type specifiers

I've tried various things:

#define _WINSOCKAPI_ in various places to disinclude winsock.h in windows.h.
Editing windows.h to include winsock2 instead of winsock.
Various #include sequences.

However, I changed the names of the winsock headers and discovered that they are not even used by the program I am trying to incorporate headers from. The host program uses Standard Microsoft Libraries while the other seems to use MFC. Could this be the problem and if so, is there a way around it?

Thank you in advance for any help.

- Chris

AnswerRe: MFC vs Standard Microsoft Libraries? Pin
Bob Stanneveld26-Nov-05 8:11
Bob Stanneveld26-Nov-05 8:11 
GeneralRe: MFC vs Standard Microsoft Libraries? Pin
newbie534526-Nov-05 11:37
newbie534526-Nov-05 11:37 
GeneralRe: MFC vs Standard Microsoft Libraries? Pin
Bob Stanneveld27-Nov-05 4:52
Bob Stanneveld27-Nov-05 4:52 
GeneralRe: MFC vs Standard Microsoft Libraries? Pin
newbie534528-Nov-05 22:33
newbie534528-Nov-05 22:33 
GeneralRe: MFC vs Standard Microsoft Libraries? Pin
Bob Stanneveld29-Nov-05 0:00
Bob Stanneveld29-Nov-05 0:00 
GeneralRe: MFC vs Standard Microsoft Libraries? Pin
newbie534529-Nov-05 8:33
newbie534529-Nov-05 8:33 
GeneralRe: MFC vs Standard Microsoft Libraries? Pin
Bob Stanneveld29-Nov-05 20:46
Bob Stanneveld29-Nov-05 20:46 
QuestionHow to use CTreePropSheet Pin
Rajesh R Subramanian25-Nov-05 17:33
professionalRajesh R Subramanian25-Nov-05 17:33 
AnswerRe: How to use CTreePropSheet Pin
Rajesh R Subramanian25-Nov-05 19:15
professionalRajesh R Subramanian25-Nov-05 19:15 
Question16 bit image lists... Pin
Peter Weyzen25-Nov-05 17:23
Peter Weyzen25-Nov-05 17:23 
AnswerRe: 16 bit image lists... Pin
Peter Weyzen25-Nov-05 17:54
Peter Weyzen25-Nov-05 17:54 
AnswerRe: 16 bit image lists... Pin
Michael Dunn25-Nov-05 19:05
sitebuilderMichael Dunn25-Nov-05 19:05 
QuestionHai , SplitterWindows Pin
CodeVarma25-Nov-05 17:03
CodeVarma25-Nov-05 17:03 
AnswerRe: Hai , SplitterWindows Pin
Michael Dunn25-Nov-05 19:09
sitebuilderMichael Dunn25-Nov-05 19:09 
QuestionWindows 3.1? Pin
Lord Kixdemp25-Nov-05 12:07
Lord Kixdemp25-Nov-05 12:07 
AnswerRe: Windows 3.1? Pin
Ravi Bhavnani25-Nov-05 13:17
professionalRavi Bhavnani25-Nov-05 13:17 
GeneralRe: Windows 3.1? Pin
Lord Kixdemp25-Nov-05 13:49
Lord Kixdemp25-Nov-05 13:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.