User forums > Using Code::Blocks
C::B With IM
kirash4:
Here you go. This is following dmoore's suggestion of removing the path from the libraries as well as their extension, and setting (or rather keeping) the search path pointed where the libraries are. I'm seeing where it's searching, and those are correct paths:
--- Code: ----------------- Clean: Release in POVpoi (compiler: GNU GCC Compiler)---------------
Cleaned "POVpoi - Release"
-------------- Build: Release in POVpoi (compiler: GNU GCC Compiler)---------------
mingw32-g++.exe -Wall -fexceptions -O2 -v -O2 -I"C:\Program Files\ImageMagick-6.8.8-Q16\include" -c G:\Dropbox\CodeBlocks\POVpoi\arc.cpp -o obj\Release\arc.o
Using built-in specs.
COLLECT_GCC=mingw32-g++.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-O2' '-v' '-O2' '-I' 'C:\Program Files\ImageMagick-6.8.8-Q16\include' '-c' '-o' 'obj\Release\arc.o' '-mtune=i386' '-march=i386'
c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/cc1plus.exe -quiet -v -I C:\Program Files\ImageMagick-6.8.8-Q16\include -iprefix c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/ G:\Dropbox\CodeBlocks\POVpoi\arc.cpp -quiet -dumpbase arc.cpp -mtune=i386 -march=i386 -auxbase-strip obj\Release\arc.o -O2 -O2 -Wall -version -fexceptions -o C:\Users\ASHLEY~1.KIR\AppData\Local\Temp\cc36P96r.s
GNU C++ (tdm-1) version 4.7.1 (mingw32)
compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
ignoring nonexistent directory "c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/mingw32"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include/c++/backward"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../include"
ignoring duplicate directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/include-fixed"
ignoring nonexistent directory "c:/program files (x86)/codeblocks/mingw/lib/gcc/../../lib/gcc/mingw32/4.7.1/../../../../mingw32/include"
#include "..." search starts here:
#include <...> search starts here:
C:\Program Files\ImageMagick-6.8.8-Q16\include
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++/mingw32
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include/c++/backward
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/../../../../include
c:\program files (x86)\codeblocks\mingw\bin\../lib/gcc/mingw32/4.7.1/include-fixed
End of search list.
GNU C++ (tdm-1) version 4.7.1 (mingw32)
compiled by GNU C version 4.7.1, GMP version 4.3.2, MPFR version 2.4.2, MPC version 0.8.2
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Compiler executable checksum: 1b05afeca9d712f769248af52f554d5e
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-O2' '-v' '-O2' '-I' 'C:\Program Files\ImageMagick-6.8.8-Q16\include' '-c' '-o' 'obj\Release\arc.o' '-mtune=i386' '-march=i386'
c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/as.exe -v -I C:\Program Files\ImageMagick-6.8.8-Q16\include -o obj\Release\arc.o C:\Users\ASHLEY~1.KIR\AppData\Local\Temp\cc36P96r.s
GNU assembler version 2.22 (mingw32) using BFD version (GNU Binutils) 2.22
COMPILER_PATH=c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/;c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/
LIBRARY_PATH=c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/lib/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../
COLLECT_GCC_OPTIONS='-Wall' '-fexceptions' '-O2' '-v' '-O2' '-I' 'C:\Program Files\ImageMagick-6.8.8-Q16\include' '-c' '-o' 'obj\Release\arc.o' '-mtune=i386' '-march=i386'
mingw32-g++.exe -L"C:\Program Files\ImageMagick-6.8.8-Q16\lib" -o bin\Release\POVpoi.exe obj\Release\arc.o -s -v -lCORE_RL_Magick++_ -lCORE_RL_magick_ -lCORE_RL_wand_
Using built-in specs.
COLLECT_GCC=mingw32-g++.exe
COLLECT_LTO_WRAPPER=c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/lto-wrapper.exe
Target: mingw32
Configured with: ../../src/gcc-4.7.1/configure --build=mingw32 --enable-languages=c,c++,ada,fortran,objc,obj-c++ --enable-threads=win32 --enable-libgomp --enable-lto --enable-fully-dynamic-string --enable-libstdcxx-debug --enable-version-specific-runtime-libs --with-gnu-ld --disable-nls --disable-win32-registry --disable-symvers --disable-build-poststage1-with-cxx --disable-werror --prefix=/mingw32tdm --with-local-prefix=/mingw32tdm --enable-cxx-flags='-fno-function-sections -fno-data-sections' --with-pkgversion=tdm-1 --enable-sjlj-exceptions --with-bugurl=http://tdm-gcc.tdragon.net/bugs
Thread model: win32
gcc version 4.7.1 (tdm-1)
COMPILER_PATH=c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/;c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/bin/
LIBRARY_PATH=c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/lib/;c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../
COLLECT_GCC_OPTIONS='-LC:\Program Files\ImageMagick-6.8.8-Q16\lib' '-o' 'bin\Release\POVpoi.exe' '-s' '-v' '-mtune=i386' '-march=i386'
c:/program files (x86)/codeblocks/mingw/bin/../libexec/gcc/mingw32/4.7.1/collect2.exe -Bdynamic -o bin\Release\POVpoi.exe -s c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../crt2.o c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/crtbegin.o -LC:\Program Files\ImageMagick-6.8.8-Q16\lib -Lc:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1 -Lc:/program files (x86)/codeblocks/mingw/bin/../lib/gcc -Lc:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../../../mingw32/lib -Lc:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/../../.. obj\Release\arc.o -lCORE_RL_Magick++_ -lCORE_RL_magick_ -lCORE_RL_wand_ -Bstatic -lstdc++ -Bdynamic -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc -lmoldname -lmingwex -lmsvcrt c:/program files (x86)/codeblocks/mingw/bin/../lib/gcc/mingw32/4.7.1/crtend.o
obj\Release\arc.o:arc.cpp:(.text.startup+0x84): undefined reference to `Magick::InitializeMagick(char const*)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x249): undefined reference to `Magick::Image::Image(std::string const&)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x26a): undefined reference to `Magick::Image::constImage() const'
obj\Release\arc.o:arc.cpp:(.text.startup+0x2c8): undefined reference to `Magick::Image::unsharpmask(double, double, double, double)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x2ed): undefined reference to `Magick::Color::Color(unsigned short, unsigned short, unsigned short)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x305): undefined reference to `Magick::Image::constImage() const'
obj\Release\arc.o:arc.cpp:(.text.startup+0x344): undefined reference to `Magick::Geometry::Geometry(unsigned int, unsigned int, int, int, bool, bool)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x36f): undefined reference to `Magick::Image::extent(Magick::Geometry const&, Magick::Color const&)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x387): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x392): undefined reference to `Magick::Image::constImage() const'
obj\Release\arc.o:arc.cpp:(.text.startup+0x3d2): undefined reference to `Magick::Geometry::Geometry(unsigned int, unsigned int, int, int, bool, bool)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x3f3): undefined reference to `Magick::Image::size(Magick::Geometry const&)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x409): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x41b): undefined reference to `Magick::Image::virtualPixelMethod(MagickCore::VirtualPixelMethod)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x45c): undefined reference to `Magick::Image::distort(MagickCore::DistortImageMethod, unsigned int, double const*, bool)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x471): undefined reference to `Magick::Image::virtualPixelMethod(MagickCore::VirtualPixelMethod)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x4b0): undefined reference to `Magick::Image::distort(MagickCore::DistortImageMethod, unsigned int, double const*, bool)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x4be): undefined reference to `Magick::Image::constImage() const'
obj\Release\arc.o:arc.cpp:(.text.startup+0x4d5): undefined reference to `Magick::Image::constImage() const'
obj\Release\arc.o:arc.cpp:(.text.startup+0x513): undefined reference to `Magick::Geometry::Geometry(unsigned int, unsigned int, int, int, bool, bool)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x546): undefined reference to `Magick::Image::extent(Magick::Geometry const&, Magick::Color const&, MagickCore::GravityType)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x55e): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x572): undefined reference to `Magick::Image::write(std::string const&)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x588): undefined reference to `Magick::Color::~Color()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x59d): undefined reference to `Magick::Image::~Image()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x601): undefined reference to `Magick::Geometry::Geometry(char const*)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x620): undefined reference to `Magick::Image::resize(Magick::Geometry const&)'
obj\Release\arc.o:arc.cpp:(.text.startup+0x636): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x8bf): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x8d4): undefined reference to `Magick::Color::~Color()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x8e9): undefined reference to `Magick::Image::~Image()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x903): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x91a): undefined reference to `Magick::Geometry::~Geometry()'
obj\Release\arc.o:arc.cpp:(.text.startup+0x931): undefined reference to `Magick::Geometry::~Geometry()'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 1 second(s))
34 error(s), 0 warning(s) (0 minute(s), 1 second(s))
Build log saved as:
file://G:/Dropbox/CodeBlocks/POVpoi/POVpoi_build_log.html
--- End code ---
stahta01:
FYI:
The order of the libs in linking matter!
I suggest trying different orders of these three.
--- Code: ----lCORE_RL_Magick++_ -lCORE_RL_magick_ -lCORE_RL_wand_
--- End code ---
Tim S.
kirash4:
--- Quote from: stahta01 on April 07, 2014, 12:11:29 am ---FYI:
The order of the libs in linking matter!
I suggest trying different orders of these three.
--- Code: ----lCORE_RL_Magick++_ -lCORE_RL_magick_ -lCORE_RL_wand_
--- End code ---
Tim S.
--- End quote ---
That's what I'm seeing in the log file:
--- Code: ---mingw32-g++.exe -L"C:\Program Files\ImageMagick-6.8.8-Q16\lib" -o bin\Release\POVpoi.exe obj\Release\arc.o -s -v -lCORE_RL_Magick++_ -lCORE_RL_magick_ -lCORE_RL_wand_
--- End code ---
osdt:
It looks like you are trying to link libraries (CORE_RL_magick_.lib, ...) built for MSVC. This will not work for MinGW as your toolchain. Is there any CORE*.a or CORE*.dll.a file in the lib-folder?
kirash4:
--- Quote from: osdt on April 07, 2014, 12:35:39 am ---It looks like you are trying to link libraries (CORE_RL_magick_.lib, ...) built for MSVC. This will not work for MinGW as your toolchain. Is there any CORE*.a or CORE*.dll.a file in the lib-folder?
--- End quote ---
Nope. So if this won't work with the MinGW toolchain with C::B, what would you suggest?
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version