[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mingw-users
Subject:    Re: [Mingw-users] linking problem (.bss section)
From:       Alois_Schlögl <alois.schloegl () gmail ! com>
Date:       2010-10-22 13:06:12
Message-ID: 4CC18C44.6000902 () gmail ! com
[Download RAW message or body]

The relevant variable is a global variable and at a two-byte address. 
So, its hardly an alignment issue.

It seems that I did not use the proper flags for dll's.
http://opsxserve.magnet.fsu.edu/pipermail/igor/2010-October/001938.html

Now, I tried compile and link with the proper flags. However, I need to 
link against to binary libraries XOPSupport.lib and IGOR.lib, which were 
compiled with MSVC.

According to this site
    http://www.mingw.org/wiki/MSVC_and_MinGW_DLLs
I need "reimp" in order to convert these lib-files to *.a files in order 
to use the mingw linker. This is what I tried to do:


I got the sources from mingw-utils,
     http://sourceforge.net/projects/mingw/files/
specifically,
    
http://sourceforge.net/projects/mingw/files/MinGW/Utilities/mingw-utils/mingw-utils-0.4-1/mingw-utils-0.4-1-mingw32-src.tar.lzma/download


I tried to run to compile and run time on linux. These attempts failed, 
probably because the spawning-mechanism within "reimp" was not supported 
on these platforms.
I tried this on wine, but then the dlltool was required, which was not 
recognized under wine.
I moved this process to a windows platform (installed mingw on windows, 
and cross-compiled reimp and moved it to windows),


Than, I tried on windows to convert the *.lib files to *.a with this 
commands

H:\tmp>reimp.exe -c --dlltool H:\MinGW\mingw32\bin\dlltool.exe IGOR.lib
H:\tmp>reimp.exe -c --dlltool H:\MinGW\mingw32\bin\dlltool.exe 
XOPSupport.lib

and got these files

H:\tmp>dir
  Volume in drive H is staff_file
  Volume Serial Number is B043-5C61

  Directory of H:\tmp

22.10.2010  14:21 <DIR>          .
22.10.2010  14:21 <DIR>          ..
22.10.2010  14:20            54.213 0
22.10.2010  14:20           106.335 132
22.10.2010  14:20            81.600 174
22.10.2010  14:20            20.158 226
22.10.2010  14:20            45.729 266
22.10.2010  14:20            39.755 306
22.10.2010  14:20            29.235 351
22.10.2010  14:20            50.584 42
22.10.2010  14:20            17.934 87
22.10.2010  14:21               449 dwdeh.s
22.10.2010  14:21             8.225 Igor.def
22.10.2010  13:57           105.038 IGOR.lib
22.10.2010  14:21                 0 libIgor.a
22.10.2010  13:50            35.071 reimp.exe
22.10.2010  13:57           468.092 XOPSupport.lib
               15 File(s)      1.062.418 bytes
                2 Dir(s)  44.006.809.600 bytes free


Igor.def was generated, bug libIgor.a is empty, and no XOPSupport.a or 
XOPSupport.def were generated. The meaning of the other files remains 
unclear to me.


Is it correct that reimp is need to convert the existing *.libs into *.a 
for linking with mingw ?
If yes, do you have a fix for "reimp" ?
Or do suggest another approach for linking IGOR.lib and XOPSupport.lib 
into a dll ?


   Alois






On 10/21/10 19:24, Martin Prüsse wrote:
> On Wed, Oct 20, 2010 at 1:55 PM, Alois Schlögl<alois.schloegl@gmail.com>  wrote:
> 
> > I'm trying to use MinGW for the development of extensions to Igor , which
> > are called XOP's using the "Igor XOP tookit".
> > 
> I will check "XOPStructureAlignmentTwoByte.h"(and
> "XOPStructureAlignmentReset.h")
> since this Igor stuff there is not a claim to support mingw, check
> "http://gcc.gnu.org/onlinedocs/gcc/Structure_002dPacking-Pragmas.html#Structure_002dPacking-Pragmas"
>  maybe the align is not being properly set(and restored).
> 
> 
> > I was able to successfully compile and link an example (XOP1), after
> > some minor changes.
> > 
> And try to use gcc (or a 'external "C"'), I don't know if using g++
> the structures will
> get a nasty vtable or something. It is only a guess, some of the changes in your
> diff are make the code compile in c++ and not plain c.
> 
> ------------------------------------------------------------------------------
> 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-users mailing list
> MinGW-users@lists.sourceforge.net
> 
> This list observes the Etiquette found at
> http://www.mingw.org/Mailing_Lists.
> We ask that you be polite and do the same.  Disregard for the list etiquette may \
> cause your account to be moderated. 
> _______________________________________________
> You may change your MinGW Account Options or unsubscribe at:
> https://lists.sourceforge.net/lists/listinfo/mingw-users
> 


------------------------------------------------------------------------------
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-users mailing list
MinGW-users@lists.sourceforge.net

This list observes the Etiquette found at 
http://www.mingw.org/Mailing_Lists.
We ask that you be polite and do the same.  Disregard for the list etiquette may \
cause your account to be moderated.

_______________________________________________
You may change your MinGW Account Options or unsubscribe at:
https://lists.sourceforge.net/lists/listinfo/mingw-users


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic