[CLN-list] CLN patch 1

Jan private jrheinlaender at gmx.de
Fri Sep 10 05:20:44 CEST 2010


Problem: MSVC creates different symbol names for 'extern "C" uint32
mulu32_high' when declared inside the cln namespace, and when defined
inside it. Linking produces "unresolved external symbol" errors.

-----
Which is allowed by the Standard (specifically, [dcl.link]). However,
it also says:

"At most one function with a particular name can have C language
linkage. Two declarations for a function with C language linkage with
the same function name (ignoring the namespace names that qualify it)
that appear in different namespace scopes refer to the same function.
Two declarations for an object with C language linkage with the same
name (ignoring the namespace names that qualify it) that appear in
different namespace scopes refer to the same object.
[Note: because of the one definition rule (3.2), only one definition for
a function or object with C linkage may appear in the program; that is,
sucha function or object must not be defined in more than one namespace
scope."
-----

Solution: Moved declarations into global namespace and prefixed with
cln_



-------------- next part --------------
A non-text attachment was scrubbed...
Name: _mulu32.patch
Type: text/x-patch
Size: 11342 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/cln-list/attachments/20100910/0d38bde6/attachment.patch>


More information about the CLN-list mailing list