:::Windows compilation/linking question:::

Pathos pathos@vianw.pt
Thu, 17 Apr 2003 22:25:46 +0100


This is a multi-part message in MIME format.

------=_NextPart_000_001C_01C30530.4A9BF610
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hi there again,

I tried using MingW, it's the same thing, doesn't work, same error =
message.
As i found out, the stdio.h file used in cygwin and MingW are diferent =
then the one i use on VS(and possibly others), and the one on the latest =
Microsoft SDK distribution. In the include files on my VS directory, and =
the include files on Microsoft's SDK, i have no reference to the =
external symbol __impure_ptr. I don't know what to do, i'm going to try =
and compile GMP using the files from the Microsoft SDK and my VS =
directory, by overwriting the libs and includes on my cygwin.

Btw, i have no obstack.h, not on VS, not on cygwin, not on mingW and not =
on Microsoft's SDK.
  ----- Original Message -----=20
  From: Chris Saunders=20
  To: Pathos=20
  Sent: Wednesday, April 16, 2003 6:29 AM
  Subject: Re: :::Windows compilation/linking question:::


  I was writing an Eiffel interface to GMP and ran into a similar =
problem.  My Eiffel compiler
  translates Eiffel code to C code and then uses VS 6 to compile the C =
code.  I solved the
  problem by using MingW to generate the library file for GMP.  I don't =
believe the file extension
  of the lib file matters but that can be easily changed.

  Regards
  Chris Saunders
  chris.saunders@sympatico.ca

    ----- Original Message -----=20
    From: Pathos=20
    To: gmp-discuss@swox.com=20
    Sent: Tuesday, April 15, 2003 11:03 PM
    Subject: :::Windows compilation/linking question:::


    Hi there!

    I'm having some problems using the gmp lib, i have WinXP, i use VS 6 =
and i compiled the sources on the latest cygwin with the =
--host=3Dwindows flag.

    First of all the output file has a .a extension, i find that weird =
since i read some posts on this mailling list and everyone, even on =
windows, talks allways about .libs, maybe i did something wrong. None =
the less, when i linked the .a file to the VS project i didn't got a =
file corruption error, so i assume it must be the right format.

    My problem is this...
    Linking...
    libgmp.a(memory.o) : error LNK2001: unresolved external symbol =
__impure_ptr
    Debug/Secure Remote Chat.exe : fatal error LNK1120: 1 unresolved =
externals
    Error executing link.exe.

    I tryed including all the headers that we're mencioned in the GMP =
manual, and still didn't work, i tryed making a search on every header =
file for that external symbol, and  i found none. I tryed google to see =
if i could find something on it, but the only decent info would allways =
come from this mailling list, and i still haven't found an answer for my =
particular problem.

    So if anyone could help me out i'de be much apreciated.
------=_NextPart_000_001C_01C30530.4A9BF610
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1141" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi there again,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I tried using MingW, it's the same =
thing, doesn't=20
work, same error message.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>As&nbsp;i found out, the stdio.h file =
used in=20
cygwin and MingW are diferent then the one i use on VS(and possibly =
others), and=20
the one on the latest Microsoft SDK distribution. In the include files =
on my VS=20
directory, and the include files on Microsoft's SDK, i have no reference =
to the=20
external symbol __impure_ptr. I don't know what to do, i'm going to try =
and=20
compile GMP using the files from the Microsoft SDK and my VS directory, =
by=20
overwriting the libs and includes on my cygwin.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Btw, i have no obstack.h, not on VS, =
not on cygwin,=20
not on mingW and not on Microsoft's SDK.</FONT></DIV>
<BLOCKQUOTE dir=3Dltr=20
style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A title=3Dchris.saunders@sympatico.ca=20
  href=3D"mailto:chris.saunders@sympatico.ca">Chris Saunders</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A title=3Dpathos@vianw.pt=20
  href=3D"mailto:pathos@vianw.pt">Pathos</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Wednesday, April 16, 2003 =
6:29=20
  AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: :::Windows=20
  compilation/linking question:::</DIV>
  <DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial =
size=3D2></FONT><BR></DIV>
  <DIV><FONT face=3DArial size=3D2>I was writing an Eiffel interface to =
GMP and ran=20
  into a similar problem.&nbsp; My Eiffel compiler</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>translates Eiffel code to C code and =
then uses VS=20
  6 to compile the C code.&nbsp; I solved the</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>problem by using MingW to generate =
the library=20
  file for GMP.&nbsp; I don't believe the file extension</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2>of the lib file matters but that can =
be easily=20
  changed.</FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <DIV><FONT face=3DArial size=3D2>Regards<BR>Chris Saunders<BR><A=20
  =
href=3D"mailto:chris.saunders@sympatico.ca">chris.saunders@sympatico.ca</=
A></FONT></DIV>
  <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
  <BLOCKQUOTE dir=3Dltr=20
  style=3D"PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; =
BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV=20
    style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
    <A title=3Dpathos@vianw.pt =
href=3D"mailto:pathos@vianw.pt">Pathos</A> </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A =
title=3Dgmp-discuss@swox.com=20
    href=3D"mailto:gmp-discuss@swox.com">gmp-discuss@swox.com</A> </DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Tuesday, April 15, 2003 =
11:03=20
    PM</DIV>
    <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> :::Windows =
compilation/linking=20
    question:::</DIV>
    <DIV><FONT face=3DArial size=3D2></FONT><FONT face=3DArial=20
size=3D2></FONT><BR></DIV>
    <DIV><FONT face=3DArial size=3D2>Hi there!</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>I'm having some problems using the =
gmp lib, i=20
    have WinXP, i use VS 6 and i compiled the sources on the latest =
cygwin with=20
    the --host=3Dwindows flag.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>First of all the output file has a =
.a=20
    extension, i find that weird since i read some posts on this =
mailling list=20
    and everyone, even on windows, talks allways about .libs, maybe i =
did=20
    something wrong. None the less, when i linked the .a file to the VS =
project=20
    i didn't got a file corruption error, so i assume it must be the =
right=20
    format.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>My problem is this...</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2>Linking...<BR>libgmp.a(memory.o) : =
error=20
    LNK2001: unresolved external symbol __impure_ptr<BR>Debug/Secure =
Remote=20
    Chat.exe : fatal error LNK1120: 1 unresolved externals<BR>Error =
executing=20
    link.exe.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>I tryed including all the headers =
that we're=20
    mencioned in the GMP manual, and still didn't work, i tryed making a =
search=20
    on every header file for that external symbol, and&nbsp; i found =
none. I=20
    tryed google to see if i could find something on it, but the only =
decent=20
    info would allways come from this mailling list, and i still haven't =
found=20
    an answer for my particular problem.</FONT></DIV>
    <DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
    <DIV><FONT face=3DArial size=3D2>So if anyone could help me out i'de =
be much=20
    apreciated.</FONT></DIV></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML>

------=_NextPart_000_001C_01C30530.4A9BF610--