Discussion:
Winelib - Getting Started guide
Josef Šimánek
2009-05-10 22:20:41 UTC
Permalink
Hi !

I was reading Winelib GSG and I tried to compile notepad from Wine
sources. So I downloaded Wine sources (version 1.1.21) and I installed
wine from Wine Ubuntu repository (version 1.1.21).

I edit Makefile and type make into console. My problem above. In the
guide is written to report bad compiling behaviour. So I did it. Any
hints ?

***@mirindoslav-laptop:~/Plocha/notepad$ make
winegcc -c -mno-cygwin -I. -o dialog.o dialog.c
winegcc -c -mno-cygwin -I. -o main.o main.c
wrc -I. -forsrc.res rsrc.rc
winegcc -mwindows -mno-cygwin -m32 -o notepad.exe.so dialog.o main.o
rsrc.res -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid
dialog.o: In function `DIALOG_StringMsgBox':
dialog.c:(.text+0x235): undefined reference to `wnsprintfW'
main.o: In function `HandleCommandLine':
main.c:(.text+0x25a5): undefined reference to `PathFindFileNameW'
collect2: ld returned 1 exit status
winegcc: i486-linux-gnu-gcc failed
make: *** [notepad.exe.so] Error 2
Dmitry Timoshkov
2009-05-11 08:08:48 UTC
Permalink
Post by Josef Šimánek
I edit Makefile and type make into console.
What exactly did you do? notepad is not supposed to work as a console
application for your information.
Post by Josef Šimánek
My problem above. In the
guide is written to report bad compiling behaviour. So I did it. Any
hints ?
winegcc -c -mno-cygwin -I. -o dialog.o dialog.c
winegcc -c -mno-cygwin -I. -o main.o main.c
wrc -I. -forsrc.res rsrc.rc
winegcc -mwindows -mno-cygwin -m32 -o notepad.exe.so dialog.o main.o
rsrc.res -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid
dialog.c:(.text+0x235): undefined reference to `wnsprintfW'
main.c:(.text+0x25a5): undefined reference to `PathFindFileNameW'
Looks like you have removed required import libraries, don't do that
if you don't know the consequences.
--
Dmitry.
Josef Šimánek
2009-05-11 12:27:08 UTC
Permalink
I did this (http://www.winehq.org/docs/winelib-guide/winelib-getting-started) :

$ winemaker --lower-uppercase .
$ make
It throws some error in wrc. So according to GSG I did exactly this:
To fix that problem, you will need to edit the list of resource files
winemaker thought notepad used, and only keep the master resource
file. To do so, open notepad2/Makefile in a text editor and search for
an assignment to a variable with RC_SRCS as part of its name. It will
likely be named notepad2_exe_RC_SRCS. There will be a list of resource
files starting on the same line. Remove them all except rsrc.rc (this
is the master one for notepad). Save your work.
Post by Dmitry Timoshkov
Post by Josef Šimánek
I edit Makefile and type make into console.
What exactly did you do? notepad is not supposed to work as a console
application for your information.
Post by Josef Šimánek
My problem above. In the
guide is written to report bad compiling behaviour. So I did it. Any
hints ?
winegcc -c  -mno-cygwin -I.   -o dialog.o dialog.c
winegcc -c  -mno-cygwin -I.   -o main.o main.c
wrc   -I.   -forsrc.res rsrc.rc
winegcc -mwindows -mno-cygwin -m32 -o notepad.exe.so dialog.o main.o
rsrc.res      -lodbc32 -lole32 -loleaut32 -lwinspool -lodbccp32 -luuid
dialog.c:(.text+0x235): undefined reference to `wnsprintfW'
main.c:(.text+0x25a5): undefined reference to `PathFindFileNameW'
Looks like you have removed required import libraries, don't do that
if you don't know the consequences.
--
Dmitry.
Loading...