On 04/30/2010 02:25 PM, Pierre Ossman wrote:
> On Fri, 30 Apr 2010 04:10:57 +0700
> Antoine Martin<anto...@nagafix.co.uk>  wrote:
>
>    
>> /bin/sh ./libtool --tag=CXX   --mode=link g++  -O3   -o jpgtest.exe
>>      
> g++ here is wrong. Did you install mingw32-gcc-c++? You need to do a
> make clean and rerun configure after you've installed it.
>    
Hah, yes, indeed. Thanks! That fixes the jpeg build.
Now I am very close to my goal (build winvnc4.exe from Linux).
To recap:

yum install mingw32-gcc-c++ mingw32-w32api mingw32-gcc mingw32-binutils
# (and maybe others - will need to start again from scratch to be sure)
cd tigervnc/trunk
autoreconf -fi
./configure --host=i686-pc-mingw32
cd win/winvnc
make

Then I hit:
/bin/sh ../../libtool --tag=CXX   --mode=link i686-pc-mingw32-g++  -g 
-O2 -mthreads -Wall -mwindows  -o winvnc4.exe  winvnc4-buildTime.o 
winvnc4-ControlPanel.o winvnc4-JavaViewer.o winvnc4-ManagedListener.o 
winvnc4-QueryConnectDialog.o winvnc4-STrayIcon.o 
winvnc4-VNCServerService.o winvnc4-VNCServerWin32.o winvnc4-winvnc.o 
../../common/rfb/librfb.la ../../win/rfb_win32/librfb_win32.la 
../../common/Xregion/libXregion.la ../../common/network/libnetwork.la 
../../common/rdr/librdr.la resources.o -lws2_32 -lgdi32 -lole32 
-lcomctl32 -lversion -lz
libtool: link: i686-pc-mingw32-g++ -g -O2 -mthreads -Wall -mwindows -o 
.libs/winvnc4.exe winvnc4-buildTime.o winvnc4-ControlPanel.o 
winvnc4-JavaViewer.o winvnc4-ManagedListener.o 
winvnc4-QueryConnectDialog.o winvnc4-STrayIcon.o 
winvnc4-VNCServerService.o winvnc4-VNCServerWin32.o winvnc4-winvnc.o 
resources.o  ../../common/rfb/.libs/librfb.a 
../../win/rfb_win32/.libs/librfb_win32.a 
../../common/Xregion/.libs/libXregion.a 
../../common/network/.libs/libnetwork.a ../../common/rdr/.libs/librdr.a 
/usr/i686-pc-mingw32/sys-root/mingw/lib/libjpeg.dll.a -lws2_32 -lgdi32 
-lole32 -lcomctl32 -lversion 
/usr/i686-pc-mingw32/sys-root/mingw/lib/libz.dll.a -mthreads 
-L/usr/i686-pc-mingw32/sys-root/mingw/lib
../../win/rfb_win32/.libs/librfb_win32.a(librfb_win32_la-SDisplay.o):/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/SDisplay.cxx:227:
 
undefined reference to `rfb::win32::CleanDesktop::~CleanDesktop()'
../../win/rfb_win32/.libs/librfb_win32.a(librfb_win32_la-SDisplay.o):/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/SDisplay.cxx:204:
 
undefined reference to `rfb::win32::CleanDesktop::CleanDesktop()'
../../win/rfb_win32/.libs/librfb_win32.a(librfb_win32_la-SDisplay.o):/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/SDisplay.cxx:210:
 
undefined reference to `rfb::win32::CleanDesktop::disableEffects()'
../../win/rfb_win32/.libs/librfb_win32.a(librfb_win32_la-SDisplay.o):/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/SDisplay.cxx:208:
 
undefined reference to `rfb::win32::CleanDesktop::disableWallpaper()'
../../win/rfb_win32/.libs/librfb_win32.a(librfb_win32_la-SDisplay.o):/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/SDisplay.cxx:206:
 
undefined reference to `rfb::win32::CleanDesktop::disablePattern()'
collect2: ld returned 1 exit status
make: *** [winvnc4.exe] Error 1

Found this in trunk/win/rfb_win32:
# These files rely on features not yet in upstream mingw
#am__append_1 = \
#  CleanDesktop.h \
#  CleanDesktop.cxx
And further down:
#am__objects_2 = librfb_win32_la-CleanDesktop.lo

Uncommenting them and running "make clean && make" triggered some new 
errors:
CleanDesktop.cxx:141: error: ISO C++ forbids declaration of 
'IActiveDesktop' with no type
CleanDesktop.cxx:141: error: expected ';' before '*' token
CleanDesktop.cxx: In constructor 'ActiveDesktop::ActiveDesktop()':
(...)

Then I found your post:
http://www.mail-archive.com/tigervnc-devel@lists.sourceforge.net/msg00434.html
Which points to this patch:
http://sourceforge.net/tracker/?func=detail&atid=302435&aid=2877129&group_id=2435
Which has already been merged into Fedora 12's version of mingw.

So then I added:
#include <shlguid.h>
To CleanDesktop.cxx
and:
include ./$(DEPDIR)/librfb_win32_la-CleanDesktop.Plo
to the Makefile (although it seemed to build without this line - it 
seems correct to have it)
And rfb_win32 built successfully at last with the CleanDesktop stuff.

But then winvnc still fails:
../../win/rfb_win32/.libs/librfb_win32.a(librfb_win32_la-CleanDesktop.o): In 
function `ActiveDesktop':
/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/CleanDesktop.cxx:49:
 
undefined reference to `_IID_IActiveDesktop'
/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/CleanDesktop.cxx:49:
 
undefined reference to `_CLSID_ActiveDesktop'
/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/CleanDesktop.cxx:49:
 
undefined reference to `_IID_IActiveDesktop'
/home/antoine/projects/tigervnc/upstream/tigervnc/trunk/win/rfb_win32/CleanDesktop.cxx:49:
 
undefined reference to `_CLSID_ActiveDesktop'

And now I am stumped.

Thanks
Antoine


------------------------------------------------------------------------------
_______________________________________________
Tigervnc-devel mailing list
Tigervnc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tigervnc-devel

Reply via email to