Click here to Skip to main content
15,922,419 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Threads and ~Component Pin
Ryan Binns11-Jul-03 16:05
Ryan Binns11-Jul-03 16:05 
GeneralContext Menu Cursor Problem Pin
dWorkVan11-Jul-03 13:55
dWorkVan11-Jul-03 13:55 
GeneralRe: Context Menu Cursor Problem Pin
Mike Nordell12-Jul-03 4:21
Mike Nordell12-Jul-03 4:21 
GeneralRe: Context Menu Cursor Problem Pin
dWorkVan14-Jul-03 7:10
dWorkVan14-Jul-03 7:10 
Generalerror C1010 help... Pin
JoeSox11-Jul-03 11:45
JoeSox11-Jul-03 11:45 
GeneralRe: error C1010 help... Pin
Mike Dimmick11-Jul-03 12:04
Mike Dimmick11-Jul-03 12:04 
GeneralRe: error C1010 help... Pin
JoeSox11-Jul-03 12:14
JoeSox11-Jul-03 12:14 
GeneralRe: error C1010 help... Pin
Mike Dimmick11-Jul-03 12:28
Mike Dimmick11-Jul-03 12:28 
If the file extension is .c, and the /Tp or /TP switch is not specified, the code should be compiled as C.

In the header files, ensure there's an extern "C" block around all the function declarations, so that the compiler doesn't decorate the names, or, rather, uses the C rules for name decoration. If this happens, the linker will complain that it can't find a funny name like ?a@@YAHD@Z, which is the decorated name for int __cdecl a(char).

This should allow your code to be written in C++, with the libraries you're using in C.

I've done this when porting a DOS application to Pocket PC, which has no console library, therefore I had to emulate a console myself. The emulation layer was written in C++, while the original application was written in, and was compiled as, C.

--
Mike Dimmick
GeneralRe: error C1010 help... Pin
Michael Dunn11-Jul-03 12:09
sitebuilderMichael Dunn11-Jul-03 12:09 
GeneralRe: error C1010 help... Pin
JoeSox11-Jul-03 12:17
JoeSox11-Jul-03 12:17 
GeneralRe: error C1010 help... Pin
John R. Shaw11-Jul-03 12:11
John R. Shaw11-Jul-03 12:11 
GeneralRe: error C1010 help... Pin
JoeSox11-Jul-03 12:19
JoeSox11-Jul-03 12:19 
GeneralOrdianl error in MFC dll Pin
11-Jul-03 11:26
suss11-Jul-03 11:26 
GeneralRe: Ordianl error in MFC dll Pin
Toni7811-Jul-03 12:07
Toni7811-Jul-03 12:07 
GeneralRe: Ordianl error in MFC dll Pin
Mike Dimmick11-Jul-03 12:51
Mike Dimmick11-Jul-03 12:51 
GeneralRe: Ordianl error in MFC dll Pin
Toni7811-Jul-03 13:27
Toni7811-Jul-03 13:27 
GeneralRe: Ordianl error in MFC dll Pin
Apollo102411-Jul-03 14:19
Apollo102411-Jul-03 14:19 
GeneralRe: Ordianl error in MFC dll Pin
KaЯl11-Jul-03 12:17
KaЯl11-Jul-03 12:17 
GeneralRe: Ordianl error in MFC dll Pin
Toni7811-Jul-03 12:41
Toni7811-Jul-03 12:41 
GeneralRe: Ordianl error in MFC dll Pin
John M. Drescher11-Jul-03 17:45
John M. Drescher11-Jul-03 17:45 
GeneralRe: Ordianl error in MFC dll Pin
hongge11-Jul-03 20:36
hongge11-Jul-03 20:36 
GeneralDynamically change SAPI grammar file Pin
clmckinley11-Jul-03 10:30
clmckinley11-Jul-03 10:30 
General:-D VST hosting Pin
Mad Docs Hairy Belly11-Jul-03 10:06
Mad Docs Hairy Belly11-Jul-03 10:06 
QuestionLimiting display of decimal places? Pin
cbruno11-Jul-03 9:44
cbruno11-Jul-03 9:44 
AnswerRe: Limiting display of decimal places? Pin
Mike Dimmick11-Jul-03 9:56
Mike Dimmick11-Jul-03 9:56 

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.