Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » ImageMagick++ on EclipseCDT(Trying to build file in Eclipse)
icon9.gif  ImageMagick++ on EclipseCDT [message #1747524] Tue, 15 November 2016 16:11
Joyita Das is currently offline Joyita DasFriend
Messages: 4
Registered: November 2016
Junior Member
Hi, I am new to Eclipse CDT. I am trying to integrate ImageMagick into eclipse. After installing Image magick and maintaining the path in Environment variables, I created a new c++ project with MINGW GCC compiler.

I am trying to test the below simple program-
#include <Magick++.h>
#include <iostream>
#include <string>


using namespace std;
using namespace Magick;

int main(int argc, char**argv){

	InitializeMagick(*argv);
	Image img;
	img.read("Image/happy-fish.jpg");
	img.write("Image/fish.png");

	return 0;
}


But i get the below error while trying to Build the project-
Info: Internal Builder is used for build
g++ "-LC:\\Development\\ImageMagick-7.0.3-Q8\\lib" -o magickTest.exe "src\\zoom.o" -lCORE_RL_Magick++_ -lCORE_RL_MagickWand_ -lCORE_RL_MagickCore_ 
src\zoom.o: In function `main':
C:\Development\Workspace\magickTest\Debug/../src/zoom.cpp:18: undefined reference to `Magick::InitializeMagick(char const*)'
C:\Development\Workspace\magickTest\Debug/../src/zoom.cpp:19: undefined reference to `Magick::Image::Image()'
C:\Development\Workspace\magickTest\Debug/../src/zoom.cpp:20: undefined reference to `Magick::Image::read(std::string const&)'
C:\Development\Workspace\magickTest\Debug/../src/zoom.cpp:21: undefined reference to `Magick::Image::write(std::string const&)'
C:\Development\Workspace\magickTest\Debug/../src/zoom.cpp:23: undefined reference to `Magick::Image::~Image()'
C:\Development\Workspace\magickTest\Debug/../src/zoom.cpp:23: undefined reference to `Magick::Image::~Image()'
collect2.exe: error: ld returned 1 exit status


I have added the header file path to GCC c++ Compiler --> Include path (-I)
"C:\Development\ImageMagick-7.0.3-Q8\include"

and the library files to MinGW C++ Linker --> Libraries(-I):
CORE_RL_Magick++_
CORE_RL_MagickWand_
CORE_RL_MagickCore_
and the path to Library Search Path(-L)
C:\Development\ImageMagick-7.0.3-Q8\lib

My system details are as below:
Windows 7 OS, SP1
Eclipse Neon CDT
ImageMagick-7.0.3-Q8

Can someone please help me with this. Please let me know how do I solve this error.
Previous Topic:GCC MinGW Compiler Settings
Next Topic:Can't set breakpoints in gdb remote debug
Goto Forum:
  


Current Time: Sun Jan 23 03:23:48 GMT 2022

Powered by FUDForum. Page generated in 0.01834 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top