Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6559425
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:19:31+00:00 2026-05-25T13:19:31+00:00

I have here a simple image converter code using Magick++(ImageMagick interface) library.(Eclipse IDE) #include

  • 0

I have here a simple image converter code using Magick++(ImageMagick interface) library.(Eclipse IDE)

#include <Magick++.h>
#include <string>
#include <iostream>

using namespace std;

using namespace Magick;

int main(int argc,char **argv) 
{ 
    Image image; 
    image.read("/home/usr1/test.tiff");
    image.write( "/home/usr1/test.bmp" ); 
    return 0;
}

I’am doing a cross compilation with arm-linux target. The code compiles successfully but on the linking part, I got undefined reference errors.

/usr/local/lib/libMagick++/libMagickCore.a(dlopen.o)(.text+0x144): In function `vm_open':
ltdl/loaders/dlopen.c:194: undefined reference to `dlopen'
/usr/local/lib/libMagick++/libMagickCore.a(dlopen.o)(.text+0x158):ltdl/loaders/dlopen.c:198: undefined reference to `dlerror'
/usr/local/lib/libMagick++/libMagickCore.a(dlopen.o)(.text+0x16c): In function `vm_close':
ltdl/loaders/dlopen.c:212: undefined reference to `dlclose'
/usr/local/lib/libMagick++/libMagickCore.a(dlopen.o)(.text+0x17c):ltdl/loaders/dlopen.c:214: undefined reference to `dlerror'
/usr/local/lib/libMagick++/libMagickCore.a(dlopen.o)(.text+0x198): In function `vm_sym':
ltdl/loaders/dlopen.c:227: undefined reference to `dlsym'
/usr/local/lib/libMagick++/libMagickCore.a(dlopen.o)(.text+0x1ac):ltdl/loaders/dlopen.c:231: undefined reference to `dlerror'

I used the following command to compile the code:

/opt/Mx800SDK/vfitc/cross/bin/arm-linux-g++ -DMx870 -I/opt/Mx800SDK/vfitc/cross/arm-linux/include -I/usr/local/include/ImageMagick -I/opt/Mx800SDK/include -O2 -Wall -c -fmessage-length=0 -fno-strict-aliasing -o'main.o' '../main.cpp'

and to link:

/opt/Mx800SDK/vfitc/cross/bin/arm-linux-g++ -L/opt/Mx800SDK/lib -L/usr/local/lib/libMagick++ -o'imgConverter' ./main.o -lpthread -lMagick++ -lMagickWand -lMagickCore -ltiff -lz

Is there any other library I need to link it successfully? Am I linking it right? Thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T13:19:32+00:00Added an answer on May 25, 2026 at 1:19 pm

    Try inverting the Magick libraries, add the MagickWand library (and put libz and other base image libraries at the end, and the dynamic linker library while you’re at it):

    ... -lpthread -lMagick++ -lMagickWand -lMagickCore -lz -ldl
    

    See Linker Order – GCC for why the order of static libraries matters.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a URI here in which a simple document.cookie query through the console
Here's my scenario: I have a simple stored procedure that removes a specific set
Here's a very simple question. I have an SP that inserts a row into
Probably a long question for a simple solution, but here goes... I have a
I have a popup DIV (js triggered) which shows an image. Very simple. The
I have written a code from the answer given here My sample code is
I'm developing simple image sharing site to train my ruby-on-rails-fu. I have following resources
I have this set of codes to create a simple before and after image
I am trying to add a simple figure into my latex code .I have
I have created a graphical image with the following sample code. BufferedImage bi =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.