delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/10/14/10:30:56

From: earnie_boyd AT hotmail DOT com (Earnie Boyd)
Subject: RE: mingw32 - noncygwin32 gcc - libwinserve.a
14 Oct 1997 10:30:56 -0700 :
Message-ID: <19971014132016.16049.qmail.cygnus.gnu-win32@hotmail.com>
To: colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp
Cc: gnu-win32 AT cygnus DOT com


>From: Colin Peters <colin AT bird DOT fu DOT is DOT saga-u DOT ac DOT jp>
>To: "'Earnie Boyd'" <earnie_boyd AT hotmail DOT com>
>Subject: RE: mingw32 - noncygwin32 gcc - libwinserve.a
>Date: Tue, 14 Oct 1997 13:23:59 +0900
>
>Earnie Boyd[SMTP:earnie_boyd AT hotmail DOT com] wrote:
>>I have ported rman-3.0.3a12 using cygwin32 without much ado.  I have 
>>ported mingw32 and gcc without the cygwin layer and "for grins" tried 
to 
>>port rman-3.0.3a12 vanilla WNT3.51.  I used the object file rman.o 
from 
>>the cygwin32 build and try to create rman.exe.  I have the paths set 
so 
>>that none of the gnuwin32 paths are searched.
>>
>>I resolved undefined references by adding the following libraries:
>>
>>   -lg -liberty -lwinserve
>>
>>   libg.a took care of a lot of _impure_ptr and __swbuf references.
>>
>>   libiberty.a took care of the __progname reference introduced by 
>>libg.a.
>>
>>   libwinserve.a took care of the _sbrk reference.
>>
>>Now I have an executable without the cygwin.dll reference.  However, 
>>when I execute I get an this error "The dynamic link library 
>>winserve.dll could not be found in the specified path...".
>
>It might be more straightforward to compile the rman.o object file
>in a mingw32 environment, though you may have to work around missing
>system calls (if any) in the source. I'm not sure that the approach
>you are taking will work.
>

---snip---


Thanks for your reply Colin.  I have recompiled with the mingw32 
environment and the program works fine.

I had previously copied all of the include files from cygwin to a 
directory I called "cinclude" and added it to the gcc search path.
I had to, however, mutz with combining the sys/types.h file from cygwin.  
This led to also futzing with time.h.  But I finally got the things 
compiled and linked and working.

I have found a bug in the mingw32 version of gcc though:
If you have spaces in a -Dmacro='"this that something"' gcc comes back 
with:

gcc: that: No such file or directory
gcc: something": Invalid argument

this happens with both MSDOS and BASH so it is not a shell thing.  The 
work around was to do a #define in the program.


??TOTALLY UNRELATED?? Is there an escape character such as the \ in BASH 
for MSDOS?  I ask this because the Makefile script has "%s(%s)" as part 
of a macro definition and in MSDOS you end up with s) as it tries to 
resolve %s(% as an environment variable.

Thanks again,

-        \\||//
---o0O0--Earnie--0O0o----
-earnie_boyd AT hotmail DOT com-
------ooo0O--O0ooo-------


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019