Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined reference to rlottie and apngasm #1

Open
quyleanh opened this issue Jan 28, 2021 · 6 comments
Open

undefined reference to rlottie and apngasm #1

quyleanh opened this issue Jan 28, 2021 · 6 comments

Comments

@quyleanh
Copy link

quyleanh commented Jan 28, 2021

I installed dependencies rlottie, libpng, and apngasm. But when I do make command, there is error as following.
Could you help me to fix? Thank you.

g++ -Wl,--start-group -lrlottie -lapngasm -lboost_filesystem -lboost_regex -Wl,--end-group -Wl,-rpath-link=/usr/local/lib    tgs2apng.cpp   -o tgs2apng
tgs2apng.cpp: In function ‘bool tgs2apng::render(const string&, const string&, size_t, size_t)’:
tgs2apng.cpp:30:38: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘size_t’ {aka ‘long unsigned int’} [-Wformat=]
   30 |  std::fprintf(stderr, "Frame count: %d\n", frames);
      |                                     ~^     ~~~~~~
      |                                      |     |
      |                                      int   size_t {aka long unsigned int}
      |                                     %ld
/usr/bin/ld: /tmp/ccWPPbxE.o: in function `tgs2apng::render(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, unsigned long, unsigned long)':
tgs2apng.cpp:(.text+0xf3): undefined reference to `rlottie::Animation::loadFromData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)'
/usr/bin/ld: tgs2apng.cpp:(.text+0x175): undefined reference to `rlottie::Animation::totalFrame() const'
/usr/bin/ld: tgs2apng.cpp:(.text+0x193): undefined reference to `rlottie::Animation::frameRate() const'
/usr/bin/ld: tgs2apng.cpp:(.text+0x25d): undefined reference to `apngasm::APNGAsm::APNGAsm()'
/usr/bin/ld: tgs2apng.cpp:(.text+0x315): undefined reference to `rlottie::Surface::Surface(unsigned int*, unsigned long, unsigned long, unsigned long)'
/usr/bin/ld: tgs2apng.cpp:(.text+0x36e): undefined reference to `rlottie::Animation::renderSync(unsigned long, rlottie::Surface, bool)'
/usr/bin/ld: tgs2apng.cpp:(.text+0x4ad): undefined reference to `apngasm::APNGFrame::APNGFrame(apngasm::rgba*, unsigned int, unsigned int, unsigned int, unsigned int)'
/usr/bin/ld: tgs2apng.cpp:(.text+0x4c6): undefined reference to `apngasm::APNGAsm::addFrame(apngasm::APNGFrame const&)'
/usr/bin/ld: tgs2apng.cpp:(.text+0x4ec): undefined reference to `apngasm::APNGAsm::assemble(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: tgs2apng.cpp:(.text+0x506): undefined reference to `apngasm::APNGAsm::~APNGAsm()'
/usr/bin/ld: /tmp/ccWPPbxE.o: in function `std::default_delete<rlottie::Animation>::operator()(rlottie::Animation*) const':
tgs2apng.cpp:(.text._ZNKSt14default_deleteIN7rlottie9AnimationEEclEPS1_[_ZNKSt14default_deleteIN7rlottie9AnimationEEclEPS1_]+0x22): undefined reference to `rlottie::Animation::~Animation()'
collect2: error: ld returned 1 exit status
make: *** [<builtin>: tgs2apng] Error 1

@ioistired
Copy link
Collaborator

Sorry for the late reply. Did you install rlottie and apngasm from source?

@code-IM-perfect
Copy link

code-IM-perfect commented Nov 21, 2021

Hi @ioistired,
I'm getting the same error and I did install rlottie from the source and apngasm from apt

@code-IM-perfect
Copy link

Update: I reinstalled Ubuntu on WSL, then built and installed all the three libraries but still getting the same error

@ioistired
Copy link
Collaborator

@code-IM-perfect I'm assuming you installed apngasm from this source: https://github.com/apngasm/apngasm right?

@code-IM-perfect
Copy link

@ioistired yup release 3.1.10

@ioistired
Copy link
Collaborator

I don't know then… I'm working on a Dockerfile which will ease these issues though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants