bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: binutils/dllwrap problem


From: Nick Clifton
Subject: Re: binutils/dllwrap problem
Date: Thu, 05 Jun 2003 12:31:31 +0100
User-agent: Gnus/5.1001 (Gnus v5.10.1) Emacs/21.2 (gnu/linux)

Hi Matt,

> hope this is the right list....

It is :-)

> on this machine running windows millenium edition
>
> $ dllwrap --driver-name gcc -o asdf 

Which version of dllwrap are you using ?


> c:\mingw\bin\dllwrap.exe: installation problem, cannot
> exec `gcc': No such file or directory

Does adding the "--verbose" flag provide any more information ?

The most likely explanation is that the pexecute() system call
provided by mingw is unable to locate the gcc executable, probably
because it is not finding the correct PATH environment variable.  It
may be that it does not use the Windows path at all.


> passing no driver-name and passing the full path to
> driver-name works, but seems unsatisfactory for things
> like make where the suggested rule is like dllwrap
> --driver-name $(CC) 

Given that dllwrap works (for you) without a --driver-name switch, why
not just leave it at that ?

The way dllwrap works is that if no --driver-name switch is used it
calls the functions deduce_name("gcc") to locate a suitable version of
gcc.  This looks at argv[0], which on some systems (including mingw)
evaluates to the full pathname for the executable, ie
"c:\mingw\bin\dllwrap.exe".  It then looks in the same directory for
gcc and hence it is able to find "c:\mingw\bin\gcc.exe".

The easiest solution would be to modify your make rule to something
like:

     ... --driver-name `which $(CC)`

This should then pass the full path for gcc to dllwrap and everything
should work.

Cheers
        Nick








reply via email to

[Prev in Thread] Current Thread [Next in Thread]