Page 1 of 1
Linux pbcurl error
Posted: Fri Jun 28, 2019 9:36 am
by DoubleDutch
On linux I use an extra include to use more of libpbcurl. It works fine on Windows and MacOS but on Linux I get a strange linker error...

Re: Linux pbcurl error
Posted: Fri Jun 28, 2019 2:51 pm
by NicTheQuick
Did you install the package libssl-dev?
Re: Linux pbcurl error
Posted: Fri Jun 28, 2019 3:25 pm
by DoubleDutch
No, but have done since.
Same error.

Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 10:19 am
by NicTheQuick
Can you show me the extra include? I assume there is an error in some Import statements.
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 1:44 pm
by DoubleDutch
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 2:46 pm
by NicTheQuick
It seems you need to modify the ImportC line to link the needed libraries:
However. I still get this error:
/usr/bin/ld: /home/nicolas/programme/purebasic/purelibraries/linux/libraries/libpbcurl.a(openssl.o): undefined reference to symbol 'BN_num_bits@@OPENSSL_1_1_0'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1: error adding symbols: DSO aus der Kommandozeile fehlt
collect2: error: ld returned 1 exit status
After some more compiling around it seems to be enough to simply write this line:
Did you try this?
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 3:03 pm
by DoubleDutch
I get
/usr/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exist status
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 3:13 pm
by NicTheQuick
Did you install the libcurl package?
Maybe you also need libcurl4-gnutls-dev.
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 3:16 pm
by DoubleDutch
I thought it installed with sudo apt-get install curl, will try that...
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 3:19 pm
by DoubleDutch
Already installed.
Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 3:28 pm
by DoubleDutch
What worked was sudo apt-get install libcurl4-openssl-dev

Re: Linux pbcurl error
Posted: Mon Jul 01, 2019 3:30 pm
by DoubleDutch
@NicTheQuick Thanks for your help with this.
@fred, not sure if this is a bug or not anymore - the other versions of purebasic (windows , osx) both accept libpbcurl...