Skip to content

tsplay undefined reference #1

Description

@be-neth

Hi !

I just clone the git repository.

I did :

  • autoreconf -fvi
  • ./configure
  • make

At the end I have linker error :


/bin/sh ./libtool --tag=CC --mode=link gcc -g -O2 -o tsplay tsplay.o libtstools.la -lresolv -lnsl -lm -lm
libtool: link: gcc -g -O2 -o .libs/tsplay tsplay.o ./.libs/libtstools.so -lresolv -lnsl -lm -Wl,-rpath -Wl,/usr/local/lib
tsplay.o: In function main': /media/Beneth/streaming_ts/tstools/tsplay.c:828: undefined reference toplay_PS_stream'
/media/Beneth/streaming_ts/tstools/tsplay.c:824: undefined reference to `play_TS_stream'
collect2: error: ld returned 1 exit status
make: *** [tsplay] Error 1


I see the two functions in tsplay_innards.c.
So I add in Makefile.am :


$ git diff
diff --git a/Makefile.am b/Makefile.am
index 60a90de..cd5189b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -45,7 +45,7 @@ tsinfo_LDADD = libtstools.la
tsreport_SOURCES = tsreport.c
tsreport_LDADD = libtstools.la

-tsplay_SOURCES = tsplay.c
+tsplay_SOURCES = tsplay.c tsplay_innards.c
tsplay_LDADD = libtstools.la

tsserve_SOURCES = tsserve.c


Redid autoreconf, ./configure and make, and issue is fix :)

Thanks.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions