List Info

Thread: Re: Building against GnuWin32 binaries of libjpeg etc?




Re: Building against GnuWin32 binaries of libjpeg etc?
country flaguser name
Australia
2007-11-28 20:46:02
John Pye wrote:
> I'd appreciate any comments on problems with the
package as it stands.
>   

Hmm... I have already found some problems with some simple
tests. I 
can't seem to link against the files in their installed
locations. Any 
suggsetions on how to fix this? Could it be that there's
some problem 
with the linking of the c:Program 
FilesGraphicsMagick-1.1.10liblibGraphicsMagick.dll.a file
and the 
c:Program
FilesGraphicsMagick-1.1.10binlibGraphicsMagick.dll files?

I'm thinking of ldconfig on Linux, is there something
similar at play 
here? Is it possible that the 'make DESTDIR' trick that I
used doesn't 
work correctly on Windows?

Cheers
JP

-----8<-----
johnSQUEAK2 ~/gm-test
$ cat gmtest.cpp
#include <Magick++.h>
#include <iostream>
using namespace Magick;
using namespace std;
int main(void){
        Image i("640x480","white");
        ColorRGB c = i.pixelColor(320,240);
        cout << "color.red = " <<
c.red() << endl;
        return 0;
}

johnSQUEAK2 ~/gm-test
$ cat SConstruct

env = Environment()

env['MAGIC_PREFIX'] = r"c:Program
FilesGraphicsMagick-1.1.10"
env['GNUWIN32_PREFIX'] = r"c:Program
FilesGnuWin32"

env.Program('gmtest',['gmtest.cpp']
        
,LIBS=['GraphicsMagick++','GraphicsMagick','jbig','tiff','fr
eetype','jpeg','png','wmflite','bz2','z','gdi32','m']
       
,LIBPATH=["$MAGIC_PREFIX/lib","$GNUWIN32_PREF
IX/lib"]
       
,CPPPATH=["$MAGIC_PREFIX/include/GraphicsMagick"]
        ,CPPDEFINES=['_DLL','_MT']
)

johnSQUEAK2 ~/gm-test
$ scons
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
g++ -o gmtest.o -c -D_DLL -D_MT "-IC:Program 
FilesGraphicsMagick-1.1.10includeGraphicsMagick"
gmtest.cpp
g++ -o gmtest.exe gmtest.o "-LC:Program 
FilesGraphicsMagick-1.1.10lib" "-LC:Program
FilesGnuWin32lib" 
-lGraphicsMagick++ -lGraphicsMagick -ljbig -ltiff -lfreetype
-ljpeg 
-lpng -lwmflite -lbz2 -lz -lgdi32 -lm
gmtest.o:gmtest.cpp:(.text+0x17e): undefined reference to 
`Magick::Color::Color(char const*)'
gmtest.o:gmtest.cpp:(.text+0x1a4): undefined reference to 
`Magick::Geometry::Geometry(char const*)'
gmtest.o:gmtest.cpp:(.text+0x1ca): undefined reference to 
`Magick::Image::Image(Magick::Geometry const&,
Magick::Color const&)'
gmtest.o:gmtest.cpp:(.text+0x1ed): undefined reference to 
`Magick::Geometry::~Geometry()'
gmtest.o:gmtest.cpp:(.text+0x210): undefined reference to 
`Magick::Geometry::~Geometry()'
gmtest.o:gmtest.cpp:(.text+0x233): undefined reference to 
`Magick::Color::~Color()'
gmtest.o:gmtest.cpp:(.text+0x26c): undefined reference to 
`Magick::Color::~Color()'
gmtest.o:gmtest.cpp:(.text+0x298): undefined reference to 
`Magick::Image::pixelColor(unsigned int, unsigned int)
const'
gmtest.o:gmtest.cpp:(.text+0x2b7): undefined reference to 
`Magick::ColorRGB::ColorRGB(Magick::Color const&)'
gmtest.o:gmtest.cpp:(.text+0x2da): undefined reference to 
`Magick::Color::~Color()'
gmtest.o:gmtest.cpp:(.text+0x300): undefined reference to 
`Magick::Color::~Color()'
gmtest.o:gmtest.cpp:(.text+0x366): undefined reference to 
`Magick::ColorRGB::~ColorRGB()'
gmtest.o:gmtest.cpp:(.text+0x37b): undefined reference to 
`Magick::Image::~Image()'
gmtest.o:gmtest.cpp:(.text+0x3f6): undefined reference to 
`Magick::ColorRGB::~ColorRGB()'
gmtest.o:gmtest.cpp:(.text+0x423): undefined reference to 
`Magick::Image::~Image()'
collect2: ld returned 1 exit status
scons: building terminated because of errors.
scons: *** [gmtest.exe] Error 1


------------------------------------------------------------
-------------
SF.Net email is sponsored by: The Future of Linux Business
White Paper
from Novell.  From the desktop to the data center, Linux is
going
mainstream.  Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Graphicsmagick-help mailing list
Graphicsmagick-helplists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gra
phicsmagick-help

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )