User forums > Using Code::Blocks
C::B With IM
dmoore:
See
http://www.imagemagick.org/discourse-server/viewtopic.php?f=2&t=22571#p94136
You can use those imagemagick-config commands as other options in the compiler and linker settings of your project (by enclosing them in back quotes) and they will passed to gcc
kirash4:
All of what's on that page is done on a unix environment. MagickWand-config doesn't exist on the Windows platform. But since I have a unix environment available:
--- Code: ---MagickWand-config --cflags --cppflags
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-6
-fopenmp -DMAGICKCORE_HDRI_ENABLE=0 -DMAGICKCORE_QUANTUM_DEPTH=16 -I/usr/local/include/ImageMagick-6
--- End code ---
And:
--- Code: ---MagickWand-config --ldflags --libs
-L/usr/local/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
-L/usr/local/lib -lMagickWand-6.Q16 -lMagickCore-6.Q16
--- End code ---
So what should I be adding to the linker options?
BlueHazzard:
--- Quote from: dmoore on April 06, 2014, 11:03:19 pm ---You can use those imagemagick-config commands as other options in the compiler and linker settings of your project (by enclosing them in back quotes) and they will passed to gcc
--- End quote ---
i think on windows this won't work easily...
--- Quote from: kirash4 on April 06, 2014, 11:01:23 pm ---I've gone through every permutation of the order and it always fails with the same exact thing. For that matter, if I completely remove the libraries from 'Linker settings' the error remains the same. It's as if it completely ignores the libraries. I don't know if there are linker options I need to be setting (and if so, what they would be.)
--- End quote ---
i reread your log, and i think you added the libraries in the wrong field, because there is no -l at the beginning of the library names:
you have to add the libraries in Project->Build Options->Linker Settings->Link libraries
greetings
dmoore:
In the one I downloaded here: http://www.imagemagick.org/script/binary-releases.php
MagicWand-config exists, but it's a bash script, so you need some sort of bash scripting environment installed, which I think ships with modern mingws...
dmoore:
--- Quote from: BlueHazzard on April 06, 2014, 11:14:10 pm ---
--- Quote from: dmoore on April 06, 2014, 11:03:19 pm ---You can use those imagemagick-config commands as other options in the compiler and linker settings of your project (by enclosing them in back quotes) and they will passed to gcc
--- End quote ---
i think on windows this won't work easily...
--- End quote ---
What doesn't work? Backtick substitutions in C::B work fine on windows and linux.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version