gcc -ladmesh: undefined reference to `stl_...'

Bug #1867917 reported by Miro Hrončok
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
admesh (Ubuntu)
New
Undecided
Unassigned

Bug Description

When I try to compile a simple admesh program, I get undefined references.

$ podman run -ti ubuntu /bin/bash

root@ea3b7cce07c4:/# apt-get update
root@ea3b7cce07c4:/# apt-get install libadmesh-dev
...
Preparing to unpack .../77-libadmesh1_0.98.3-2_amd64.deb ...
Unpacking libadmesh1:amd64 (0.98.3-2) ...

root@ea3b7cce07c4:/# cat > source.c
#include <stdlib.h>
#include <admesh/stl.h>

int main(void) {
  stl_file stl;
  char *filename = "directory/model.stl";
  stl_open(&stl, filename);
  stl_exit_on_error(&stl);
  stl_close(&stl);
  return EXIT_SUCCESS;
}

root@ea3b7cce07c4:/# pkg-config --libs libadmesh
-ladmesh

root@ea3b7cce07c4:/# gcc -ladmesh source.c
/tmp/ccTjhgWs.o: In function `main':
source.c:(.text+0x3d): undefined reference to `stl_open'
source.c:(.text+0x4c): undefined reference to `stl_exit_on_error'
source.c:(.text+0x5b): undefined reference to `stl_close'
collect2: error: ld returned 1 exit status

This does not happen on Debian, but it does happen on Ubuntu.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.