From: Bruno P. <br...@po...> - 2005-09-19 08:42:59
|
Since I have a Windows machine available, I thought I'd write a tutorial on building pano12.dll with MinGW. I need a bit of help here, there are a couple of problems: 1. The library doesn't get stripped, even if I run: make install-strip I suppose users can strip the binary by hand if necessary. 2. The tiff library isn't linked statically, so I get an error like this when I run hugin: libtiff-3.dll was not found Windows users shouldn't have to copy the tiff library as well? If I build libtiff with --disable-shared, libpano12 fails to build: Warning: This system can not link to static lib archive /usr/local/lib/libtiff.la Any suggestions? My tutorial is attached: = Building PANO12.DLL for Windows = I'm no Windows expert, this tutorial is the first time I used these tools to build software, so if I can do it, so can you. == Set-up the build environment == To start you need a Free C compiler and associated tools, so [http://www.mingw.org/download.shtml Download MinGW and MSYS]. I grabbed the "Windows Installer" versions: '''MinGW-4.1.1.exe''' and '''MSYS-1.0.10.exe'''. The first one is the "Minimalist Gnu for Windows", it provides a win32 version of the GNU compiler and related tools. The second is a "Minimal SYStem", this provides a [http://en.wikipedia.org/wiki/POSIX POSIX] environment. Answer yes to the questions and enter the directory where you installed MinGW when asked: c:/MinGW == Download the source-code == First you need panorama tools itself, so [http://sourceforge.net/project/showfiles.php?group_id=96188 download pano12 sourcecode], I downloaded '''libpano12-2.7.0.10.zip'''. You also need the sourcecode for the various libraries required by pano12, these are [http://www.zlib.net/ zlib], [http://www.libpng.org/pub/png/libpng.html libpng], [http://www.ijg.org/ libjpeg] and [http://www.libtiff.org/ libtiff]. There is no longer any need to download the Java development kit as MinGW now includes a Free version. I downloaded '''zlib123.zip''', '''lpng128.zip''', '''jpegsr6.zip''' and '''tiff-3.7.4.zip''' (I would normally download the ''.tar.gz'' versions, but Windows seems to have some kind of ''.zip'' extractor built-in so I thought I'd use that). Extract the files into directories called ''libpano12'', ''zlib'', ''libpng'', ''libjpeg'' and ''libtiff''. The default MSYS ''home'' on this system is ''C:\msys\1.0\home\Bruno.Postle'', so I put these directories in there. == Build everthing == Double-click ''MSYS'' and you should get a small window with a command-line, this is a POSIX shell. The following commands need to be typed into the shell. If you make a mistake, just type ''cd'' to return to your ''home'' and try again. Compilation results in lots of text scrolling very fast up the screen, ignore any warnings, but error messages will give you a clue when things are not working properly. === Build zlib === cd zlib ./configure make make install cd === Build libpng === cd libpng cp scripts/makefile.gcc Makefile make cp png.h /usr/local/include cp pngconf.h /usr/local/lib cp libpng.a /usr/local/lib cd === Build libjpeg === cd libjpeg ./configure make make install make install-lib make install-headers cd === Build libtiff === cd libtiff ./configure make make install cd === Build libpano12 === cd libpano12 ./configure make make install == Finishing up == This final step will create the ''binary'' versions of the files here: C:\msys\1.0\local\bin The files you need are '''PTOptimizer.exe''', '''pano12.dll''' and '''panoinfo.exe'''. |
From: Bruno P. <br...@po...> - 2005-09-20 09:39:52
|
On Mon 19-Sep-2005 at 09:42 +0100, Bruno Postle wrote: > > If I build libtiff with --disable-shared, libpano12 fails to > build: > > Warning: This system can not link to static lib archive > /usr/local/lib/libtiff.la It builds ok if I just delete libtiff.la, leaving libtiff.a. I've put the tutorial here: http://www.panotools.info/mediawiki/index.php?title=Build_pano12_from_sourcecode Corrections and improvements welcome. -- Bruno |