Hello,

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.

Since PE do not allow unresolved symbols to compile, I couldn't find a
way to work on this port for Windows without altering the whole
application a lot.

To make things a bit clearer, this is what I wanted to achieve:

test.exe needs to remain the executable but also export some symbols:
foo_help and foo_hello

Needed to create a import library for these symbols (libtest.a) and
allow plugin.dll link to it

Every time tried using extern and export these symbols ended with
unresolved references to foo_help and foo_hello, even when libtest.a
contains those definitions.

Also tried with __cdeclspec(dllexport) and __cdeclspec(dllimport) in
test and plugin respectively without avail.

As I've been suing dynamic languages for quite long, I'm definitely
getting rusty at C.

Does anyone have a hint to achieve this without radically altering the
original program?

Thank you.
-- 
Luis Lavena
AREA 17
-
Perfection in design is achieved not when there is nothing more to add,
but rather when there is nothing more to take away.
Antoine de Saint-Exupéry

------------------------------------------------------------------------------
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
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to