[CLN-list] CLN patch 1
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
Solution: Moved declarations into global namespace and prefixed with
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 11342 bytes
Desc: not available
More information about the CLN-list