Subject: Re: cygwin32 to 68k cross compiler revisited
From: [email-masked] (Steve Hanka)

14 Mar 1998 07:41:17 -0800
Message-ID: <[email-masked]>
References: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
To: [email-masked]
Cc: [email-masked]

Hi Garrick,

I had the same problem that you described and am sending the answer I
came up with to you and to the gnu-win32 mailing list in hopes of finding
a better solution.  I hope you don't mind my putting your private e-mail
on the list.

Garrick Kremesec wrote:

> Mr. Hanka,
> 
>     I've been trying to build the cross compiler for the m68k under
> cywin32 as well and having been running into the same problem repeatedly.
> After running:
> 
> ./configure --host=i586-pc-cygwin32 --target=m68k--coff --with-gnu-as
> 	--with-gnu-ld --without-stabs -v
> 
> everything responds well.  But then, after running: make all install
> 
> I keep getting this error:
> 
> prefix.0: In function 'lookup_key':
> /usr/src/gcc-2.8.1/prefix.c:193: undefined reference to 'RegOpenKeyExA@20'
> /usr/src/gcc-2.8.1/prefix.c:193: undefined reference to 'RegOpenKeyExA@20'
> 
> I don't understand how it could make a poor call to RegOpenKey when all
> the header files are seemingly executing properly up to this point?  I
> traced the Reg*KeyEx* calls to windows.h but I'm unsure how to solve this
> problem.  Any iteas?  Thanks.

I had the same problem.  I had to hack the makefile a little to get it to
work.  There is a CLIB variable in the makefile generated by configure
that is supposed to be used for local system libraries.  I modified it
to point to the ".a" files (the lib files) for the cygwin32 dlls.  The 
program then compiled and linked properly.  This may be unorthodox, but it
did what I wanted in a hurry.  

There are a set of ".a" files in the cygnus b19 subdirectory tree named
libkernel32.a, libuser32.a libgdi32.a libadvapi32.a and so forth.  I pointed
the CLIB variable in the makefile at them as follows:

       DLLPREFIX=c:/cygnus/b19/H-i386-cygwin32/i386-cygwin32/lib
       CLIB=$(DLLPREFIX)/libkernel32.a $(DLLPREFIX)/libuser32.a \
	$(DLLPREFIX)/libgdi32.a $(DLLPREFIX)/libadvapi32.a \
	$(DLLPREFIX)/libcomdlg32.a $(DLLPREFIX)/libnetapi32.a

I re-ran make and the build completed successfully.  Would anyone on 
the gnu-win32 mailing list know of a more elegant way of doing this?

Steve Hanka
[email-masked]
-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".