Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: problem with my simple Ada interface versus gcc6  (Read 2005 times)

0 Members and 1 Guest are viewing this topic.

fastrgv

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Email
problem with my simple Ada interface versus gcc6
« on: June 18, 2017, 12:43:45 am »
This is a minimal example demonstrating my difficulty using
the new 2017 AdaCore gnat compiler [using GCC v6.3.1]
versus that from 2016 [GCC v 4.9.4]
in order to create a simple Ada binding to SFML-Audio on Linux.

The script lcmp16.sh uses the older version and works fine.
The script lcmp17.sh uses the new version and fails...
[undefined references].

I have narrowed the problem to the executable "g++".
The 4.9.4 version works for me,
and newer versions do not.

Any suggestions how to make the new version compile
would be sincerely appreciated.

Here is a piece of the error message:

undefined reference to `sf::Music::openFromFile(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'


Rod

<fastrgv@gmail.com>
« Last Edit: June 18, 2017, 04:27:48 pm by fastrgv »

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 10815
    • View Profile
    • development blog
    • Email
Re: problem with my simple Ada interface versus gcc6
« Reply #1 on: June 18, 2017, 04:25:08 am »
Looks like you simply have to recompile SFML using the newer g++

In GCC 5 they changed the ABI for some things, including strings. As such binaries may become incompatible.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

fastrgv

  • Newbie
  • *
  • Posts: 23
    • View Profile
    • Email
Re: problem with my simple Ada interface versus gcc6
« Reply #2 on: June 18, 2017, 03:27:29 pm »
Thanks eXpl0it3r.  You were exactly right !  Everything works now.
Rod

 

anything