This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

mixing GNU and MS tools/libraries to build a DLL


Hello. It looks like I am having a peculiar case to solve. It seems to me that
recipes found in FAQ or in the mail archives don't apply.
I am not a guru on MS and gnu related stuff... so coming to a dead end,
I decided to post this one, hoping in somebody's help. 

I developed an application on top of ME10 (a CAD program by HP), using the
application
interface which comes with ME10 distibution. This application (quite a huge
one) 
runs fine on Unix and X, but I need to get the thing working on NT machines
too. 

On Unix I make a static link, but on NT I am forced to build a dll out of
my stuff. 
In order to speed up conversion time I am tring to use the Cygwin tools and
libraries. 
Well, I succeded in compiling all my stuff using gcc, then I made a big object
(e.g. tnt.o or tnt.obj) using ld. In the code just one DllExport symbol is
defined explicitly, 
which should serve to enter the module.
At this point I have to merge tnt.o with an me10f.lib library to resolve
ME10 related symbols. 
I made this by using link, and this seems to work, but I am still having 8
undefined symbols:
  __data_start__
  ___DTOR_LIST__
  __bss_start__
  _mainCRTStartup
  __data_end__
  __bss_end__
  ___CTOR_LIST__
  __DllMainCRTStartup@12

So... what am I doing wrong, and what should I do at this point?
Is it correct and safe to mix stuff compiled with gcc and MSVC, and then
link it in part
with GNU ld and in part with MS link?
Obviously I don't have access to ME10 sources. Is it possible to convert
the me10f.lib 
library, in a format compatible with ld, so that I can use just ld to link
the whole thing?
And which tools are available to do this conversion?
Thanks for your attention and your time. Sincerely,
--- Glauco Masotti



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com