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

How to configure pkgconfig #26

Closed
lxlenovostar opened this issue Jan 5, 2018 · 1 comment
Closed

How to configure pkgconfig #26

lxlenovostar opened this issue Jan 5, 2018 · 1 comment

Comments

@lxlenovostar
Copy link

I stuck on:

Traceback (most recent call last):
  File "example.py", line 3, in <module>
    import pyrtcdc
ImportError: ../src/librtcdc.so: undefined symbol: nice_candidate_free

I have read #19 .
But I‘m confused with this explanation:

$ PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libnice/lib/pkgconfig pkg-config --cflags openssl nice
-D_REENTRANT -I/usr/local/Cellar/openssl/1.0.2j/include -I/usr/local/opt/libnice/include/nice -I/usr/local/opt/libnice/0.1.13/include -I/usr/local/Cellar/glib/2.48.2/include/glib-2.0 -I/usr/local/Cellar/glib/2.48.2/lib/glib-2.0/include -I/usr/local/opt/gettext/include -I/usr/local/Cellar/pcre/8.39/include
$ PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libnice/lib/pkgconfig pkg-config --libs openssl nice
-L/usr/local/Cellar/openssl/1.0.2j/lib -L/usr/local/opt/libnice/lib -L/usr/local/Cellar/glib/2.48.2/lib -L/usr/local/opt/gettext/lib -lssl -lcrypto -lnice -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl 

Please explain how to configure pkgconfig.
Thank you.

@lxlenovostar
Copy link
Author

I build librtcdc on Ubuntu 16.04 .
I install libnice, usrstcp, openssl in /opt, and I configure it by:
step1

#update /etc/ld.so.conf and add :
/opt
#execute the following command in the terminal
sudo ldconfig

step 2

cd librtcdc/src
#update Makefile: 
$(CC) -shared -fPIC $(LDFLAGS) $(OBJECTS) -o $@
#to:
$(CC) -shared -fPIC $(OBJECTS) $(LDFLAGS)-o $@

step 3


PKG_CONFIG_PATH=/opt/lib/pkgconfig pkg-config --cflags  openssl  nice 
PKG_CONFIG_PATH=/opt/lib/pkgconfig pkg-config --libs   openssl  nice
PKG_CONFIG_PATH=/opt/lib/pkgconfig   CPATH=/opt/include LIBRARY_PATH=/opt/lib  LD_LIBRARY_PATH=/opt/lib make

This work for me.

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