Re: [Libpgf-user] Problems building pgf tools on Ubuntu 10.10
libPGF is an implementation of the Progressive Graphics File (PGF)
Brought to you by:
c_stamm
From: Leith B. <le...@le...> - 2011-12-08 21:27:50
|
Hi, I tracked down the problem. Ubuntu 10.10 has a newer version of FreeImage than the one included with pgf. As such the FreeImage headers in the pgf include directory conflicted with the installed FreeImage binary. It is a *really* bad idea to include library header files in Linux source distributions. I fixed this by removing the include folder from makefile.am. Also now that FreeImage supports unsigned width and height I modified the CImage::Create function to use unsigned int instead of int, and removed the (WORD) casts. I also modified the second Create function to use unsigned int for bpp as it is a bad idea to mix unsigned/signed stuff. The PNMPlugin.ccpp also likely needs an update to use unsigned ints with the updated FreeImage functions. There are some more signed/unsigned conversions in here too. I now have the program compiled. Unfortunately it appears the program won't open my 9.9GB TIFF data that I want to compress: Error: Could not load source file. Does the FreeImage library handle BigTIFF files? ie files > 4GB. If it doesn't I am going to have to write some sort of plugin for GDAL to convert my files. Does PGF define a format for storing geospatial information, or will I have to define my own? (Possibly create a new standard for it) Thanks, Leith Bade le...@le... On 9 December 2011 09:02, Leith Bade <le...@le...> wrote: > Hi, > > I am trying to install the pgf tools on Ubntu 10.10 but I get some > really strange linker errors about FreeImagePlus: > libtool: link: g++ -g -O2 -o pgf PNMPlugin.o CImage.o PGF.o > -lfreeimageplus /usr/lib/libpgf.so > CImage.o: In function `CImage::Create(int, int, unsigned char)': > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:93: undefined > reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short, unsigned int, unsigned int, unsigned > int)' > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:73: undefined > reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short, unsigned int, unsigned int, unsigned > int)' > CImage.o: In function `CImage::Create(int, int, int)': > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:44: undefined > reference to `fipImage::setSize(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short, unsigned int, unsigned int, unsigned > int)' > CImage.o: In function `CImage': > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined > reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short)' > /home/leith/projects/pgf-6.11.42/src/CImage.cpp:29: undefined > reference to `fipImage::fipImage(FREE_IMAGE_TYPE, unsigned short, > unsigned short, unsigned short)' > > I have installed the Ubuntu libfreeimage-dev package, and it seems to > be finding the .so as before I installed libfreeimage ld complained > that it could not find it. > > The strange thing is that the errors reference parameter typed of > "unsigned short", but the header FreeImagePlus.h defines the > parameters as just "unsigned". Where is ld getting the idea that they > should be "unsigned plus"? > > Removing the "(WORD)" casts from CImage.cpp did not seem to change anything. > > Thanks, > Leith Bade > le...@le... |