[CLN-list] CLN patch 2

Jan private jrheinlaender at gmx.de
Sat Sep 11 13:17:37 CEST 2010


Hello Alexei,

here is another hairy one.

1. Problem: MSVC does not tag 
"extern cl_private_thing cl_I_constructor_from_UL (uint32 wert);"
in cln/number.h with the cln namespace because it is declared inside the
body of an inlined function (symbol created is
>>?cl_I_constructor_from_UL@@YAPAUcl_anything at cln@@K at Z<<)

But cl_I_constructor_from_UL is defined inside cln namespace in
cl_I_from_UL.cc (symbol created is
>>?cl_I_constructor_from_UL at cln@@YAPAUcl_anything at 1@K at Z<<)

So we get unresolved external symbols on every assignment and
constructor operation.

2. Solution (rather, work-around):
Create an auxiliary function
cln::cl_private_thing cl_I_constructor_from_UL (uint32 wert);

outside of namespace cln which references
cln::cl_private_thing cln::cl_I_constructor_from_UL(wert);

Note: 
The attached patch is exemplary only. As soon as the method to solve
this issue is agreed on, similar patches will have to be made for other
constructors

Best regards,
	Jan

-------------- next part --------------
A non-text attachment was scrubbed...
Name: cl_I_constructor.patch
Type: text/x-patch
Size: 2000 bytes
Desc: not available
URL: <http://www.cebix.net/pipermail/cln-list/attachments/20100911/6035d950/attachment.patch>


More information about the CLN-list mailing list