Linux pbcurl error

Linux specific forum
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Linux pbcurl error

Post 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...

Image
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
NicTheQuick
Addict
Addict
Posts: 1223
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Linux pbcurl error

Post by NicTheQuick »

Did you install the package libssl-dev?
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post by DoubleDutch »

No, but have done since.

Same error. :(
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
NicTheQuick
Addict
Addict
Posts: 1223
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Linux pbcurl error

Post by NicTheQuick »

Can you show me the extra include? I assume there is an error in some Import statements.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post by DoubleDutch »

https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
NicTheQuick
Addict
Addict
Posts: 1223
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Linux pbcurl error

Post by NicTheQuick »

It seems you need to modify the ImportC line to link the needed libraries:

Code: Select all

ImportC "-lpbcurl -lssl -lcrypt"
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:

Code: Select all

ImportC "-lcurl"
Did you try this?
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post by DoubleDutch »

I get
/usr/bin/ld: cannot find -lcurl
collect2: error: ld returned 1 exist status
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
NicTheQuick
Addict
Addict
Posts: 1223
Joined: Sun Jun 22, 2003 7:43 pm
Location: Germany, Saarbrücken
Contact:

Re: Linux pbcurl error

Post by NicTheQuick »

Did you install the libcurl package?

Code: Select all

sudo apt install libcurl4
Maybe you also need libcurl4-gnutls-dev.
The english grammar is freeware, you can use it freely - But it's not Open Source, i.e. you can not change it or publish it in altered way.
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post by DoubleDutch »

I thought it installed with sudo apt-get install curl, will try that...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post by DoubleDutch »

Already installed.
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post by DoubleDutch »

What worked was sudo apt-get install libcurl4-openssl-dev :)
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
User avatar
DoubleDutch
Addict
Addict
Posts: 3219
Joined: Thu Aug 07, 2003 7:01 pm
Location: United Kingdom
Contact:

Re: Linux pbcurl error

Post 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...
https://deluxepixel.com <- My Business website
https://reportcomplete.com <- School end of term reports system
Post Reply