Coder Social home page Coder Social logo

Comments (8)

mxmlnkn avatar mxmlnkn commented on July 23, 2024 1

Ok, changing the -stdlib=libc++ part in FLAGS_OTHER to -stdlib=libstdc++ makes the .cpp compile, but then linking fails with:

/usr/bin/ld: cannot find -lc++abi
clang: error: linker command failed with exit code 1 (use -v to see invocation)

After removing -lc++ from LIBS := in the Makefile, it links correctly.

Unfortunately, it only builds the static and shared libraries and not the ISOBMFF-Dump command line tool?
I got that to work somehow by manually compiling it:

clang -fno-strict-aliasing -ISubmodules/PIMPL/PIMPL/include -IISOBMFF/include/ \
-std=c++o isobmff-dump ISOBMFF-Dump/main.cpp \
Build/Release/Products/x86_64/libISOBMFF.a -lstdc++ -lm

and running it with ./isobmff-dump IMG_1234.heic works.

Btw, the dump prints in one line - Handler name: [NUL-ASCII-CHAR]. I don't think printing non-printable ascii characters is intended? It's basically the only non-printable char in the whole output.

from isobmff.

macmade avatar macmade commented on July 23, 2024

Which Linux distribution are you using?

from isobmff.

macmade avatar macmade commented on July 23, 2024

You probably don't have libc++ installed. Try your example with -stdlib=libc++.

from isobmff.

mxmlnkn avatar mxmlnkn commented on July 23, 2024

-std=libc++ does indeed lead to the same problem for the example.

from isobmff.

mxmlnkn avatar mxmlnkn commented on July 23, 2024

I'm using Debian.

I had libc++ installed:

ii  libc++1:amd64                        3.7.0-1                 amd64                   LLVM C++ Standard library

Would have surprised me if not. I tried to install libc++-dev but it didn't help and now I have these package versions (I hope my system doesn't break...)

+++-====================================-=======================-=======================-==============================================================================
ii  libc++-7-dev:amd64                   1:7.0.1-8               amd64                   LLVM C++ Standard library (development files)
ii  libc++-dev:amd64                     1:7.0-47.1              amd64                   LLVM C++ Standard library (development files)
un  libc++-x.y                           <none>                  <none>                  (no description available)
un  libc++-x.y-dev                       <none>                  <none>                  (no description available)
ii  libc++1:amd64                        1:7.0-47.1              amd64                   LLVM C++ Standard library
ii  libc++1-7:amd64                      1:7.0.1-8               amd64                   LLVM C++ Standard library
un  libc++abi-x.y                        <none>                  <none>                  (no description available)
un  libc++abi1                           <none>                  <none>                  (no description available)
ii  libc++abi1-7:amd64                   1:7.0.1-8               amd64                   LLVM low level support for a standard C++ library

It might be better to use CMake for better platform compatibility.

from isobmff.

macmade avatar macmade commented on July 23, 2024

This is a known package issue on Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=855222

You may try to change the Makefile to use libstdc++ and GCC instead, but I haven’t tried it.

from isobmff.

macmade avatar macmade commented on July 23, 2024

I’m currently on holiday. I’ll take a closer look when I’m back.

from isobmff.

zhjb7 avatar zhjb7 commented on July 23, 2024

Maybe you should use g++ instead of clang.
update Makefile like this:
CC := g++
FLAGS_CPP :=
LIBS :=

from isobmff.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.