Hi,
I would like to receive emails via SSL/TLS under MacOS (High Sierra v 10.12.6) and had a look at the code from "infratec" at the following link:
https://www.purebasic.fr/english/viewt ... t=libcurl
Using Windows 7 the code works fine, under MacOS I got following linker errors using different PB Versions:
PB 5.73: Id: warning: object file (/Contents/Resources/compilers/debugger.a/Debugger.o) was build for newer version ( 10.8 ) than beeing linked...
PB 6.04: Id: warning: object file (purebasic.o) was build for newer version ...
PB 6.10: Undefined symbols for curl_easy_setopt", received from: _mainin purebasic.o ...
I'm using default system lib for MAC (curl/libcurl 7.4.5.0)
Any ideas ?
Linker error using libcurl under MAC
Re: Linker error using libcurl under MAC
For this you need the external libcurl.
Have you set the constant #LibCurl_ExternalDLL = #True
In front of the include of LibCurl.pbi
Have you set the constant #LibCurl_ExternalDLL = #True

In front of the include of LibCurl.pbi
Re: Linker error using libcurl under MAC
Why should I use an external lib under MacOS when it is already delivered with every OS ?
I think that the libraries in the respective PB version do not fit the operating system.
We also know that from Scintilla. Using PB 5.73 I can compile a form including Scintilla gadget.
Under PB6.04 orPB 6.10 there are linker errors ...
I think that the libraries in the respective PB version do not fit the operating system.
We also know that from Scintilla. Using PB 5.73 I can compile a form including Scintilla gadget.
Under PB6.04 orPB 6.10 there are linker errors ...
Re: Linker error using libcurl under MAC
I fixed it.
Please download the file again.
Please download the file again.
Re: Linker error using libcurl under MAC
Thank you very much for your quick answer and the code changes in libcurl.pbi. The library now runs without errors.
Here some test results I did with Windows 7 SP2 x64 and MacOS Sierra 10.12.6:
Perhaps this helps ?
Regards
Here some test results I did with Windows 7 SP2 x64 and MacOS Sierra 10.12.6:
Code: Select all
- libcurl.pbi demo : Windows -> ok
Mac -> ok
- GetCertInfo.pb : Windows -> Certification Info ok
Mac -> 0 certs! !!
- pop3.pbi : Windows -> Message List ok
-> no Message Header (Date, From, Subject) !!
-> curl_easy_perform() failed: Couldn't resolve host name
using IP instead works, but without message header ..
Mac -> Message List ok
-> Message Header ok
- Asynchronous.pb : Windows -> ok
MacOS -> linker error
- HTTPRequestI.pbi : Windows -> ok
MAC -> ok
EmailWithFileAttachment.pb : Windows -> Failure when receiving data from the peer
(Port 465) MacOS -> linker error
Regards
Re: Linker error using libcurl under MAC
pop3.pbi works for me in windows with a gmx.net account.
Also EmailWithFileAttachment.pb works for me in windows with a web.de account.
I will test macOS tomorrow.
Also EmailWithFileAttachment.pb works for me in windows with a web.de account.
I will test macOS tomorrow.
Re: Linker error using libcurl under MAC
macOS (Sonoma 14.5)
GetCertInfo.pb : Ok
3 certs!
...
EmailWithFileAttachment.pb: Ok
The curl_mime stuff was added in libcurl 7.56.0
What is reportet from libcurl.pbi ? (Sierra 10.12.6 is not really up to date)
GetCertInfo.pb : Ok
3 certs!
...
EmailWithFileAttachment.pb: Ok
The curl_mime stuff was added in libcurl 7.56.0
What is reportet from libcurl.pbi ? (Sierra 10.12.6 is not really up to date)
Re: Linker error using libcurl under MAC
Hi again, this is my report:
--- LibCurl Info ---
Version: 7.54.0
Host: x86_64-apple-darwin16.0
SSL: SecureTransport
Libz: 1.2.8
Protocols:
dict
file
ftp
ftps
gopher
http
https
imap
imaps
ldap
ldaps
pop3
pop3s
rtsp
smb
smbs
smtp
smtps
telnet
tftp
--- LibCurl Info ---
You are right, not really the latest OS. But based on the application it is still enough
I installed XCode 8.3.3 on this machine...
When I start curl in the console, I get the following information regarding the relevant protocols:
curl 7.54.0 libcurl
SSLv2, SSLv3, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3
I have another (clean) Mac 11.6.8 but without Xcode installed (don't want to). So I can try with compiled versions...
---
Yesterday I got the message: "invalid memory access" using pop3.pb. Then I customized the library by deleting all parts related to Windows and Linux. After that the error message stopped appearing. But GetCertInfo.pb runs with "no certs", I continue testing ...
Once again thanks for your support !!
--- LibCurl Info ---
Version: 7.54.0
Host: x86_64-apple-darwin16.0
SSL: SecureTransport
Libz: 1.2.8
Protocols:
dict
file
ftp
ftps
gopher
http
https
imap
imaps
ldap
ldaps
pop3
pop3s
rtsp
smb
smbs
smtp
smtps
telnet
tftp
--- LibCurl Info ---
You are right, not really the latest OS. But based on the application it is still enough

I installed XCode 8.3.3 on this machine...
When I start curl in the console, I get the following information regarding the relevant protocols:
curl 7.54.0 libcurl
SSLv2, SSLv3, TLS 1.0, TLS 1.1, TLS 1.2, TLS 1.3
I have another (clean) Mac 11.6.8 but without Xcode installed (don't want to). So I can try with compiled versions...
---
Yesterday I got the message: "invalid memory access" using pop3.pb. Then I customized the library by deleting all parts related to Windows and Linux. After that the error message stopped appearing. But GetCertInfo.pb runs with "no certs", I continue testing ...
Once again thanks for your support !!
Re: Linker error using libcurl under MAC
By the way: I use an account of my own domain. MultiPart is working fine using command "pop3_GetMessageByNumber(...)"
But only with modified lib...
But only with modified lib...