Discussion:
An annoying link behavior [no exports=FAIL]
(too old to reply)
J
2012-07-30 23:54:49 UTC
Permalink
Linking C shared library barcode_paper.electronics.bplug
Error! No exports in 'barcode_paper.electronics.bplug'
Error(E42): Last command making
(barcode_paper\barcode_paper.electronics.bplug) returned a bad status


Although one would normally expect this to be a valid sanity check; since
of course if you're building a DLL why wouldn't you have any exported
symbols? What use would it be? Well.... Since I sort of cheat, and
include additional startup stuff in the rt_init section of the library, I
register my entry points without actually exporting them.


It would be nice if the default behavior was to allow DLLs with no
exports. I vaguely remember an option to tell the linker not to care, but
it ends up being simpler to just add

PUBLIC( void, ExportThis )( void ) {}
// this is a macro that generates a general
// extern "C" __declspec(dllexport) return_type procname (or compatible
idea)

But; again it would just be nice if like all other compilers I use
(mingw[gcc], visual studio) it would just let me build a DLL with no
public symbols.

Jim
J
2012-08-01 22:55:56 UTC
Permalink
Post by J
Linking C shared library barcode_paper.electronics.bplug
Error! No exports in 'barcode_paper.electronics.bplug'
Error(E42): Last command making
(barcode_paper\barcode_paper.electronics.bplug) returned a bad status
Although one would normally expect this to be a valid sanity check;
since of course if you're building a DLL why wouldn't you have any
exported symbols? What use would it be? Well.... Since I sort of
cheat, and include additional startup stuff in the rt_init section of
the library, I register my entry points without actually exporting them.
It would be nice if the default behavior was to allow DLLs with no
exports. I vaguely remember an option to tell the linker not to care,
but it ends up being simpler to just add
PUBLIC( void, ExportThis )( void ) {}
// this is a macro that generates a general
// extern "C" __declspec(dllexport) return_type procname (or compatible
idea)
But; again it would just be nice if like all other compilers I use
(mingw[gcc], visual studio) it would just let me build a DLL with no
public symbols.
Nevermind; turns out it was fixed in 1.9 I'm still using 1.8
Post by J
Jim
--
Using Opera's revolutionary email client: http://www.opera.com/mail/
Loading...