Page 1 of 1
Want to use CodeBlocks under Windows
Posted: 2010-05-25T23:46:15-07:00
by evilhomer
Hi everybody,
i want to develop a small thing under windows with the Magick++ stuff, but the linker seems to miss some objects.
Code: Select all
#include <Magick++.h>
#include <stdio.h>
#include <dirent.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
using namespace Magick;
int main( int argc, char **argv )
{
InitializeMagick(*argv);
Image oImage;
oImage.read( "test.jpg" );
oImage.zoom( Geometry("200x200") );
oImage.read( "test_out.jpg" );
return 0;
}
but the compiler says:
C:\Dokumente und Einstellungen\userbane\Eigene Dateien\c.devel\scaleimage\main.cpp|15|undefined reference to `Magick::InitializeMagick(char const*)'|
....
i asked allready the guys in the codeblocks forum, but the say ask the guys from imagemagick... so i hope somebody can help me.
The most time i develop under linux, and there i have no problems but windows... only trouble with it.
Re: Want to use CodeBlocks under Windows
Posted: 2010-05-26T05:39:11-07:00
by magick
Go to c:/Program Files/ImageMagick-6.6.2-0/Magick++_demos and click on the button project. Now build and execute. Most likely it will run without complaint. Now use this project as a model for your own Magick++ custom code.
Re: Want to use CodeBlocks under Windows
Posted: 2010-05-26T07:33:25-07:00
by evilhomer
Hi,
thanks for you replay.
But there is the same problem.
I think CodeBlocks miss a libary but i dont know how to say the linker in CodeBlocks where he can find the Libs.
Code: Select all
C:\Programme\ImageMagick-6.6.1-Q16\Magick++_Demo\button.o:button.cpp:(.text+0x17f)||undefined reference to `Magick::InitializeMagick(char const*)'|
CodeBlocks does not understand the projectfiles in the demo Folder, it looks like M$ C++ project files.
Re: Want to use CodeBlocks under Windows
Posted: 2010-05-26T09:00:56-07:00
by magick
The button project has a Visual C++ workspace. Its a sanity check to ensure ImageMagick is installed properly and can link and execute Magick++ code. We just tried it on our system and it worked as expected suggesting the ImageMagick Windows distribution is sound.
Code::Blocks permits you to import Visual C++ workspaces. Perhaps additional manual configuration is required.
Re: Want to use CodeBlocks under Windows
Posted: 2010-05-26T23:19:28-07:00
by evilhomer
Hmmm dose not work,
it seems that the import of the MS C++ Project file does not bring the libraries with it.
Code: Select all
||=== zoom, default ===|
.objs\zoom.o:zoom.cpp:(.text+0x2af)||undefined reference to `Magick::InitializeMagick(char const*)'|
.objs\zoom.o:zoom.cpp:(.text+0x2d5)||undefined reference to `Magick::Geometry::Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x2ea)||undefined reference to `Magick::Geometry::Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x2ff)||undefined reference to `Magick::Geometry::Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x426)||undefined reference to `Magick::Geometry::Geometry(char const*)'|
.objs\zoom.o:zoom.cpp:(.text+0x445)||undefined reference to `Magick::Geometry::operator=(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x477)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x4a9)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0xa03)||undefined reference to `Magick::Geometry::Geometry(char const*)'|
.objs\zoom.o:zoom.cpp:(.text+0xa22)||undefined reference to `Magick::Geometry::operator=(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0xa54)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0xa86)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0xb76)||undefined reference to `Magick::Geometry::Geometry(char const*)'|
.objs\zoom.o:zoom.cpp:(.text+0xb95)||undefined reference to `Magick::Geometry::operator=(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0xbc7)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0xbf9)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0xe7d)||undefined reference to `Magick::Image::Image(std::string const&)'|
.objs\zoom.o:zoom.cpp:(.text+0xeab)||undefined reference to `Magick::Image::density(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0xecd)||undefined reference to `Magick::Image::density() const'|
.objs\zoom.o:zoom.cpp:(.text+0xeef)||undefined reference to `Magick::Geometry::operator=(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0xf21)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0xf56)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x10f7)||undefined reference to `Magick::Geometry::Geometry(unsigned int, unsigned int, unsigned int, unsigned int, bool, bool)'|
.objs\zoom.o:zoom.cpp:(.text+0x1116)||undefined reference to `Magick::Geometry::operator=(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x1148)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x117d)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x1192)||undefined reference to `Magick::Image::density(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x11e5)||undefined reference to `Magick::Image::sample(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x1206)||undefined reference to `Magick::Image::scale(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x1227)||undefined reference to `Magick::Image::filterType(MagickCore::FilterTypes)'|
.objs\zoom.o:zoom.cpp:(.text+0x123c)||undefined reference to `Magick::Image::zoom(Magick::Geometry const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x125e)||undefined reference to `Magick::Image::write(std::string const&)'|
.objs\zoom.o:zoom.cpp:(.text+0x1290)||undefined reference to `Magick::Image::~Image()'|
.objs\zoom.o:zoom.cpp:(.text+0x12c2)||undefined reference to `Magick::Image::~Image()'|
.objs\zoom.o:zoom.cpp:(.text+0x1391)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x13a6)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x13bb)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x15f2)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text+0x1615)||undefined reference to `Magick::Geometry::~Geometry()'|
.objs\zoom.o:zoom.cpp:(.text$_ZNK6Magick5Image7columnsEv[Magick::Image::columns() const]+0xd)||undefined reference to `Magick::Image::constImage() const'|
.objs\zoom.o:zoom.cpp:(.text$_ZNK6Magick5Image4rowsEv[Magick::Image::rows() const]+0xd)||undefined reference to `Magick::Image::constImage() const'|
||=== Build finished: 41 errors, 0 warnings ===|
Can you say me wich libs are required.
The header files seems to be found, the only things were missed are the libs it seems
Re: Want to use CodeBlocks under Windows
Posted: 2010-06-17T00:32:54-07:00
by n00b32
i thought this was a nice e-z lib .... theres no need for another incomprehensive undocumented hard to use and huge image library. (we have sdl xD)
this topic is hmmm important because maybe it shows a bug in magick++ (tho i dont kno)
and the
Go to c:/Program Files/ImageMagick-6.6.2-0/Magick++_demos and click on the button project. Now build and execute. Most likely it will run without complaint. Now use this project as a model for your own Magick++ custom code.
makes me think that there is NO support whatsoever just bots replying predefined unhelpful stuff.
i dont like libraries and communities like that and its a pity i have a program that uses magick++, changing it to not use it would be harder then writing from scratch, and i cant use vc++ .
if u made a lib that doesnt work and u have no intention whatsoever to repair it why release it. i would recommend ctrl+a shift+delete enter and windowslogo+r shutdown -s -t 00 or just plainly go to /dev/null
if you are offendend then reread this topic trying to put urself in the position of the OriginalPoster and think again
Re: Want to use CodeBlocks under Windows
Posted: 2010-06-17T00:36:38-07:00
by n00b32
and if u did all that then tell me why doesnt it work if i have all includes/libraries imported
?
if u say that its ok that means u desing code NOT to work. and what good is that ?
Re: Want to use CodeBlocks under Windows
Posted: 2012-07-10T08:05:35-07:00
by Eames34
Hi,
I am trying to use ImageMagick on CodeBlocks under Windows, and I have the same problems when I try to compile a simple code:
Code: Select all
undefined reference to `Magick::InitializeMagick(char const*)'
undefined reference to `Magick::Image::~Image()'|
undefined reference to `Magick::Image::~Image()'|
...
Below the procedure I have followed for the installation :
[*]Download and execute binary file from
http://www.imagemagick.org/script/binar ... hp#windows
[*]Compiler debbug settings : Add to Linker Settigns -> C:\Program Files (x86)\ImageMagick-6.7.8-Q16\lib\CORE_RL_magick_.lib
[*]Compiler debbug settings : Add to Linker Settigns -> C:\Program Files (x86)\ImageMagick-6.7.8-Q16\lib\CORE_RL_Magick++_.lib
[*]Compiler debbug settings : Add to Linker Settigns -> C:\Program Files (x86)\ImageMagick-6.7.8-Q16\lib\CORE_RL_wand_.lib
[*]Compiler debbug settings : Add to Searchdirectories>Compiler -> C:\Program Files (x86)\ImageMagick-6.7.8-Q16\include
[*]Compiler debbug settings : Add to Searchdirectories>Linker -> C:\Program Files (x86)\ImageMagick-6.7.8-Q16\lib
I have to do something else? Did I did something wrong?
Thank you for your help.
Re: Want to use CodeBlocks under Windows
Posted: 2012-07-31T15:44:33-07:00
by alexsmith
I'm trying the same thing (using Magick++ with CodeBlocks) with no success.
Unfortunately, as far as I'm aware of, the libs in the package you install from the binaries are compiled for Visual Studio only.
Going a little further, I read you can use ImageMagick source code and compile your code against it. I will try that out.
Using Visual Studio 2008 Express, I was able to open and compile the Demo project, but when I try to run the code, all I get are fatal exceptions.
Will let you know if I get there.
And I do agree the community deserves more than what has been posted here as answers. :S
EDIT 1:
viewtopic.php?f=1&t=13814#p50357