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

tsplay undefined reference #1

Open
be-neth opened this issue Sep 12, 2014 · 0 comments
Open

tsplay undefined reference #1

be-neth opened this issue Sep 12, 2014 · 0 comments

Comments

@be-neth
Copy link

be-neth commented Sep 12, 2014

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.

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

1 participant