Build with libraries from GNU

Apology if this is the incorrect place to post this query. If anyone
knows of a better forum to post this question, please let me know
directly (xxxxx@solidum.com).

Has anyone tried to build an executable using MSVC++ 6.0
compiler/linker with libraries built from GNU compiler/library
utility?

When I tried to link with the default MSVC libraries (libc.lib,
kernel32.lib, etc) and libraries built from the GNU compiler/library
utility, I got the following warning:

> LINK : warning LNK4049: locally defined symbol “__iob” imported

The linker actually generates an executable, but the executable cannot
be run properly (ie. it will seg fault). Can anyone tell me what this
warning means, and how I can resolve it?

TIA.
-thai-


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

> Has anyone tried to build an executable using MSVC++ 6.0

compiler/linker with libraries built from GNU compiler/library
utility?

Doubts. GNU libs are built with other C runtime functions which other
internal details, with other set of header file macros (accompanying the C
runtime functions) etc.
Using GNU library binary with MSVCRT.DLL will with large probability lead to
a disaster.

Max


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

MS VC(++) has a linker option of not using any default libraries.
Presumably one could use VC to compile source code using only GNU headers
and only the cygwin dll as the system interface. Of course, VC lags GCC
somewhat
in implemented features. However, one could use the VS6 ide which is fairly
nice.

----- Original Message -----
From: “Maxim S. Shatskih”
To: “NT Developers Interest List”
Sent: Monday, January 29, 2001 8:43 PM
Subject: [ntdev] Re: Build with libraries from GNU

> > Has anyone tried to build an executable using MSVC++ 6.0
> > compiler/linker with libraries built from GNU compiler/library
> > utility?
>
> Doubts. GNU libs are built with other C runtime functions which other
> internal details, with other set of header file macros (accompanying the C
> runtime functions) etc.
> Using GNU library binary with MSVCRT.DLL will with large probability lead
to
> a disaster.
>
> Max
>
>
> —
> You are currently subscribed to ntdev as: xxxxx@mindspring.com
> To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com

I’m afraid it’s not possible to link objects and libraries built with gcc
with VC. GNU tools create COFF relocation records for call targets and
static data references using different arithmetic. I know 'cos I tried
linking MASM files with DJGPP compiled C source. You can try a utility I
wrote (masm2djg) that patches objects produced by MASM & VC so that ‘ld’
links them correctly - see : http://www.softsystem.co.uk/masm2djg.zip

– Lawrence Rust


You are currently subscribed to ntdev as: $subst(‘Recip.EmailAddr’)
To unsubscribe send a blank email to leave-ntdev-$subst(‘Recip.MemberIDChar’)@lists.osr.com