extern (C) Names & Signatures

Chris via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Jun 16 02:05:52 PDT 2014


I use a library written in C. There are these two functions

1. MyLib_Initialize(), an existing 3rd party function
2. my_lib_initialize(), my custom function

On Linux (my main platform) it compiled and worked without an 
error. On Windows, however, implib printed a warning and said 
that two definitions of a function were found, and that the 
redefinition would be ignored. my_lib_initalize() was ignored and 
my program didn't compile until I changed the function name to 
my_lib_init(). Why is that? On Linux there was no such problem.


More information about the Digitalmars-d-learn mailing list