Jon S Berndt writes:
> >
> >You have to admire Curt's methodology - fatally breaking the Cygwin build
> >has certainly created a momentum to fix it, and presumably saved the 
> >time and hassle of riddling the sound code with ifdefs!
> This approach works only when there is a solution somewhere.  From 
> what I could tell in this case, that wasn't guaranteed - I was not 
> confident that a viable fix would be found.  

Nor was I, but usually one can find a way to compile Windows
code with gcc but it often requires digging into the depths of the 
gnu linker documentation and studying the x86 specific link options
for creating DLLs for WIN32.

In this case the code depended on having both WIN32 and _WIN32
defined during compilation and the use of the link options
 -Wl,--export-all-symbols *.o $(LOCAL_PROJECT_LIBS)
 -Wl,--no-whole-archive $(LIBS)

which are LDs way of getting the proper linkage for symbols into 

i.e. these export all local definitions and establish the 'thunks' to the 
imported definitions

Judicous use of these flags along with compiling with the -mdll flag
and linking with the -shared arguments to gcc usually results in being
able to get a DLL built

of course you still need to properly identify definitions with the usual
DLLIMPORT DLLEXPORT macros but when compiling existing 
working WIN32 code you can almost always assume that this has
always been done correctly.



Flightgear-devel mailing list

Reply via email to