comp.lang.ada
 help / color / mirror / Atom feed
* GNAT CE 2019 C++ Link Failure With Mojave
@ 2019-07-14  4:27 Roger
  2019-07-14 10:17 ` Jeffrey R. Carter
  2019-07-19  2:55 ` Roger
  0 siblings, 2 replies; 4+ messages in thread
From: Roger @ 2019-07-14  4:27 UTC (permalink / raw)


Mac-Mini 2018
OSX 10.14.5 Mojave
GPRBUILD Community 2019 (20190517) (x86_64-apple-darwin17.7.0)
ImageMagick-7.0.8-35

The C++ code below fails to link on my Mac-Mini under Mojave:

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

using namespace std;
using namespace Magick;

int main(int argc, char **argv)
  {
  string  Logo_File = "../images/logo.jpg";
  Image   logo_image;

  Magick::InitializeMagick(*argv);
  logo_image.read(Logo_File);
  return 0;
}

Failure message:
Undefined symbols for architecture x86_64:
  "Magick::Image::read(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)", referenced from:
      _main in display_logo.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
gprbuild: link of display_logo.cpp failed
gprbuild: failed command was: /opt/gnat/2019/bin/g++ display_logo.o libshow_logo.a -L/opt/lib -lMagickCore-7.Q16HDRI -lMagick++-7.Q16HDRI -g -Wl,-rpath,/opt/lib -o /Ada_Source/OglAda_Examples/imagemagick/logo//display_logo

This code works with GNAT CE 2019 on my MacBook under High Sierra.
It also works using XCode on my Mac-Mini.
Failure occurs for both brew imagemagick and locally built imagemegick.

I use Magick::Image::read and related imagemagick routines in C++ interface code for a number of Ada projects which all build without error on my MacBook under High Sierra.

Any assistance will be greatly appreciated.
Thanks,
Roger 



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-19  2:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-14  4:27 GNAT CE 2019 C++ Link Failure With Mojave Roger
2019-07-14 10:17 ` Jeffrey R. Carter
2019-07-14 11:53   ` Roger
2019-07-19  2:55 ` Roger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox