Click here to Skip to main content
15,892,298 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCSplitterWnd Pin
john56325-Oct-08 3:36
john56325-Oct-08 3:36 
AnswerRe: CSplitterWnd Pin
PJ Arends5-Oct-08 11:19
professionalPJ Arends5-Oct-08 11:19 
AnswerRe: CSplitterWnd Pin
Hamid_RT6-Oct-08 1:56
Hamid_RT6-Oct-08 1:56 
Questionpoi command error? Pin
George_George5-Oct-08 2:06
George_George5-Oct-08 2:06 
Questionname decoration issue in DLL Pin
George_George5-Oct-08 0:54
George_George5-Oct-08 0:54 
AnswerRe: name decoration issue in DLL Pin
cmk5-Oct-08 2:05
cmk5-Oct-08 2:05 
GeneralRe: name decoration issue in DLL Pin
George_George5-Oct-08 2:49
George_George5-Oct-08 2:49 
GeneralRe: name decoration issue in DLL Pin
cmk5-Oct-08 3:46
cmk5-Oct-08 3:46 
The default _cdecl is standard, the _ prefix is used by all vendors.
Other calling conventions are vendor specific (__stdcall is only MS i think).

Use extern "C" {} _and_ the default _cdecl when you want to create a dll with one compiler that can be called by an exe compiled using any other compiler.

If you have a .cpp file all functions will be named using C++ naming - mangled. If you have a .c file all functions will be named using C naming - mangled as described in the url i posted in previous message. The default _cdecl .c naming is considered by most to be unmangled, even though it is (leading _).

Using extern "C" in a .cpp file, or extern "C++" in a .c file, just allows you override the default naming the compiler uses based on the file extension (.c or .cpp).

In your dumpbin output MyFunc1 _is_ mangled (_MyFunc). The default is so standard that the _ is often dropped from display - but it is there.

...cmk

The idea that I can be presented with a problem, set out to logically solve it with the tools at hand, and wind up with a program that could not be legally used because someone else followed the same logical steps some years ago and filed for a patent on it is horrifying.
- John Carmack

GeneralRe: name decoration issue in DLL Pin
George_George5-Oct-08 21:05
George_George5-Oct-08 21:05 
GeneralRe: name decoration issue in DLL Pin
cmk6-Oct-08 2:50
cmk6-Oct-08 2:50 
GeneralRe: name decoration issue in DLL Pin
George_George6-Oct-08 22:53
George_George6-Oct-08 22:53 
GeneralRe: name decoration issue in DLL Pin
cmk7-Oct-08 4:54
cmk7-Oct-08 4:54 
GeneralRe: name decoration issue in DLL Pin
George_George7-Oct-08 22:18
George_George7-Oct-08 22:18 
GeneralRe: name decoration issue in DLL Pin
cmk8-Oct-08 4:24
cmk8-Oct-08 4:24 
GeneralRe: name decoration issue in DLL Pin
George_George8-Oct-08 21:40
George_George8-Oct-08 21:40 
GeneralRe: name decoration issue in DLL Pin
cmk9-Oct-08 2:11
cmk9-Oct-08 2:11 
GeneralRe: name decoration issue in DLL Pin
George_George9-Oct-08 3:04
George_George9-Oct-08 3:04 
GeneralRe: name decoration issue in DLL Pin
Bram van Kampen28-Oct-08 14:27
Bram van Kampen28-Oct-08 14:27 
GeneralRe: name decoration issue in DLL Pin
George_George30-Oct-08 3:26
George_George30-Oct-08 3:26 
GeneralRe: name decoration issue in DLL Pin
Bram van Kampen31-Oct-08 15:45
Bram van Kampen31-Oct-08 15:45 
QuestionBitmap on Wizrad [modified] Pin
john56325-Oct-08 0:29
john56325-Oct-08 0:29 
AnswerRe: Bitmap on Wizrad Pin
Hamid_RT5-Oct-08 2:04
Hamid_RT5-Oct-08 2:04 
GeneralRe: Bitmap on Wizrad Pin
john56325-Oct-08 3:07
john56325-Oct-08 3:07 
QuestionStatic variable in c/c++ Pin
Subrat 47082665-Oct-08 0:26
Subrat 47082665-Oct-08 0:26 
AnswerRe: Static variable in c/c++ Pin
montiee5-Oct-08 1:07
montiee5-Oct-08 1:07 

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.