Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

linking C++ with C

1 view
Skip to first unread message

Anton Schegg

unread,
Apr 19, 1993, 11:37:00 AM4/19/93
to
Hi,
is there a way to link object-files produced with the C++ compiler
with object-files generated from the C compiler?
I like to link C++ code with rpc-libs and got this error message:
appl_s.obj() : warning 0516: ?I_RpcGetBuffer@@YGJPAU_RPC_MESSAGE@@@Z is
undefined

Ciao


... to...@usm.abg.sub.org

John Grant

unread,
Apr 19, 1993, 8:41:05 PM4/19/93
to
In article <2bd329a...@usm.abg.sub.org> to...@usm.abg.sub.org (Anton Schegg) writes:
>Hi,
>is there a way to link object-files produced with the C++ compiler
>with object-files generated from the C compiler?
>I like to link C++ code with rpc-libs and got this error message:
>appl_s.obj() : warning 0516: ?I_RpcGetBuffer@@YGJPAU_RPC_MESSAGE@@@Z is
>undefined

Put an "extern C" wrapper around your functions so the
names won't get mangled (as they do in C++ mode).
This should be documented fairly well in your manuals -
look up 'mangle' or 'name mangling'

--
John A. Grant jag...@emr1.emr.ca
Airborne Geophysics
Geological Survey of Canada, Ottawa

0 new messages