On 10/23/2010 01:39 PM, Luis Lavena wrote:

I was attempting to port a program from Linux to Windows where certain
functions are exported and used by plugin/extensions. Since the
program is not a shared object, there is no import library to link
with.

Dear Luis,

Please find attached an example I made some time ago while answering a similar question.

1. Each plugin calls a function bar() that is in main.cc.
2. The interface in the plugin is done by the constructor of a static object, which sets the global "x" to point to it.

Expected result:
./a.out.exe ./my_dll.dll
89

./a.out.exe ./my_other_dll.dll
130

Hope this helps,

Cesar

Attachment: plugin_test.tar.gz
Description: GNU Zip compressed data

------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to