Unexpected message from winebuild...

Kevin Cousins kevin at proximity.com.au
Tue Apr 1 23:59:33 CST 2003

...when attempting to build a WineLib application.

Remember, I'm attempting to get something that will run-time link
against a native DLL, so I take my code, run it by "winemaker", run
"./configure", then "make", all with options I believe to be
appropriate.  In particular, given export WINEDIR=/home/kevin/wine, the
root of my Wine source tree checked out from winehq CVS yesterday, and
export DLLINCDIR=/home/kevin/include, then from within the directory
containing the C source code for my simple console app I execute the

$ winemaker --cuiexe -I${DLLINCDIR} -I${WINEDIR}
$ ./configure --with-wine=${WINEDIR} \
--with-wine-dlls=${WINEDIR}/libs/dlls --srcdir=`pwd` \
$ make

Until make executes, there seems to be no obvious problem (at least to
my eyes), and even then, as the compilation happens, I get a nice file
called "prog.o" written.

However, as "winebuild" executes, I see the following:

LD_LIBRARY_PATH="/home/kevin/wine/libs/wine:/home/kevin/wine/libs/unicode:$LD_LIBRARY_PATH" /home/kevin/wine/tools/winebuild/winebuild -fPIC -o prog.exe.spec.c --exe prog.exe -mcui   prog.o   -L/home/kevin/lib -L/home/kevin/lib/wine  -ladvapi32 -lcomdlg32 -lgdi32 -lkernel32 -lodbc32 -lole32 -loleaut32 -lshell32 -luser32 -lwinspool 
could not open .def file for advapi32

I don't believe I even need anything from advapi32.dll.so, let alone
most of the other Wine DLLs mentioned on the winebuild command line. 
Even if I hack the generated Makefile so as to remove mention of any
Wine DLLs on the winebuild command line, winebuild still complains about
not opening "...a .def file for ntdll".

On a related note, the configure script generated by winemaker complains
about test linking against -L${WINEDIR}/dlls -lntdll.dll and subsequent
equivalent builtin DLLs such as -lkernel32.dll and -luser32.dll.  My
quick hack is merely to clone the symbolic links in ${WINEDIR}/dlls to
add a "lib" prefix, vis:

$ ( cd ${WINEDIR}/dlls ; ls -l *ntdll.dll* )
  lrwxrwxrwx    1 kevin    18 Apr  1 15:29 ntdll.dll.so -> ntdll/ntdll.dll.so
  lrwxrwxrwx    1 kevin    18 Apr  1 15:29 libntdll.dll.so -> ntdll/ntdll.dll.so

That keeps configure happy, but I wonder what I'm doing wrong.  This is
Wine built from CVS as of 20030401 (i.e. yesterday).

Suggestions?  Particularly for the wanted .def files.  They're %^*&@#
builtin DLLs!


More information about the wine-devel mailing list