apache - linking C++ library so as it is callable as C -
i not expert @ c/c++ linking magic. g++ , cygwin neither, rather novice indeed.
imagine have executable, (apache server in case), accepts c library modules. e.g. compiled file libmyserver.so
if guts coding in c++, , export only vanilla functions, example static member functions of class i'd call cexporttoc... if linking magic make library libmyserver reachable program requesting c libraries ?
you don't @ link time, declare compiler not mangle names when generating code (which of course disallows overloads). put declarations of things want expose c extern "c" { ... }
block. see e.g. faq. classes pretty out of luck here, unless you're willing lot of work , live pita. , then, single compiler writer can break code (in ways show in runtime bugs, not in compile errors).
Comments
Post a Comment