On Tue, 5 Dec 2000, davep wrote:

> I've been attempting to port a Windoze project to winelib using the new
> 'winemaker' facility, updated from CVS on Sunday. In the course of an
> afternoon I got a 50,000-line application to compile clean (discovering several
> latent bugs in the process!), however the final link operation fails thus:

   Yes. The GNU compilers are very good for that. Note that by default
winemaker does nto use -Wall. You can try turning it on to unleash the
full warning power of gcc/g++ (and thus discover even more latent bugs).
But at first it can be a bit overwhelming.


> gcc -shared -Wl,-rpath,/usr/local/lib -Wl,-Bsymbolic -o zmdi.so about.o action.o
>  analyser.o chart.o child.o child_net.o colour.o cursor.o design.o dispatch.o ge
> nerate.o intercep.o messages.o misc.o noise.o paint.o param.o print.o redraw.o r
> egistry.o statbar.o toolbar.o tools.o txline.o update.o utility.o winmain.o zmdi
> .o   zmdi.spec.o      -lwine -lwine_unicode -lm  -lutil -ldl
> /dave/smith/action.c:772: undefined reference to `itoa'
> generate.o: In function `save_network':
> /dave/smith/generate.c:981: undefined reference to `_makepath'
> statbar.o: In function `CreateSBar':
> /dave/smith/statbar.c:297: undefined reference to `CreateStatusWindowA'
> toolbar.o: In function `CreateTBar':
> /dave/smith/toolbar.c:67: undefined reference to `CreateToolbarEx'
> winmain.o: In function `WinMain':
> /dave/smith/winmain.c:88: undefined reference to `strupr'
> zmdi.o: In function `MsgCreate':
> /dave/smith/zmdi.c:170: undefined reference to `InitCommonControls'
> test -e zmdi || ln -s /usr/local/bin/wine zmdi                                  

  itoa and strupr: these are MS extensions to the C library. They come
in two forms: with and without a leading underscore. Try adding the
following macros where you use them:

#define itoa(x,buf,rdx)            _itoa(x,buf,rdx)
#define strupr(str)                _strupr(str)

  For the others it probably simply means you're not importing all the
necessary libraries. More specifically you should add comctl32 to your
zmdi.spec file.
  And for _makepath you can try to either import crtdll from your
zmdi.spec file, or, and it may be safer, try to do without it.


--
Francois Gouget         [EMAIL PROTECTED]        http://fgouget.free.fr/
            Before you criticize someone, walk a mile in his shoes.
       That way, if he gets angry, he'll be a mile away - and barefoot.


Reply via email to