[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Interix, libtool, wgcc

From: Duft Markus
Subject: Interix, libtool, wgcc
Date: Tue, 18 Jul 2006 17:35:13 +0200

Hey all!
After some hard work, i've released another version of wgcc (see sourceforge, "interix-wgcc") which now has some major improvements for shared libraries (and static ones, and mixing both types of libraries), it even generates some assembler code on the fly while linking..... ;o)
Now i'd need some people who have some spare time to take a look at wgcc and test it a little. I so far got nearly no feedback on things working or not, so i can only tell that the things i compile myself work... Would be great to know a little more.
If you are interested, just read on the few following lines, i'll explain some traps:
for global variables in shared libraries one has to modify the sources a little. If you have the following original sources:
extern int variable;
#include "lib.h"
int variable = 10;
you will have to modify that to look something like that to work on all platforms:
#if defined(_WIN32)
#    if defined(_COMPILING_lib_)
#        define _lib_EXPORT __declspec(dllexport)
#    else
#        define _lib_EXPORT __declspec(dllimport)
#    endif
#    define _lib_EXPORT
extern _lib_EXPORT int variable;
#include "lib.h"
_lib_EXPORT int variable = 10;
just define _COMPILING_lib_ if you're compiling the shared library objects, and DON'T worry about static libraries, if you need them, they will work with exactly the same sources as shown above, since wgcc generates some assembler sources to include all symbols needed for this, and somehow fits things together (i not quite sure if _I_ know how it works ;o))
this should be everything you have to know to test things. I just added the import/export defines above myself to i-don't-know-how-many files, and my fingers still hurt ;o) but it's worth... and it doesn't take too long... ;o)
i hope somebody has interest in this, otherwise tell me !
Regards, Markus

reply via email to

[Prev in Thread] Current Thread [Next in Thread]