User forums > Using Code::Blocks

C::B With IM

<< < (3/7) > >>

BlueHazzard:

--- Quote from: dmoore on April 06, 2014, 11:18:25 pm ---
--- 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.

--- End quote ---
the unix build script with windows

Jenna:

--- Quote from: kirash4 on April 06, 2014, 11:11:18 pm ---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?

--- End quote ---
I would try adding the path to the lib-folder to the libraries search-path and the name of the libs without path and extension to the link-library list.
If the libs are compiled with c and not c++ you might get problems because of name mangling, if they are compiled with/for cygwin, they might not work at all with gcc.
For the name mangling problem (if you do not already know how to fix) search for "name mangling extern c" (https://duckduckgo.com/?q=name+mangling+extern+c).

dmoore:

--- Quote from: BlueHazzard on April 06, 2014, 11:20:12 pm ---the unix build script with windows

--- End quote ---

hmm... it looks like it needs pkg-config, which you can get on windows but takes a bit of work (e.g. you need gtk for some strange reason)


--- Quote from: BlueHazzard on April 06, 2014, 11:14:10 pm ---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

--- End quote ---

Try this.

kirash4:
I'm doing it in the global compiler settings because I'm not actually working inside of a project, just a single c++ file. Basically I took the same file I compile on my unix environment and opened it in C::B.

kirash4:

--- Quote from: dmoore on April 06, 2014, 11:17:46 pm ---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...

--- End quote ---

Which specifically did you download? I grabbed 'ImageMagick-6.8.8-10-Q16-x64-dll.exe' and there is no MagickWand-config script, at least not in its install folder.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version