Forum > General

Undefined symbol: atexit

(1/2) > >>

RDL:
Hello.

Linux Arch + Lazarus 2.2.0 + Cross Win64

I am trying to statically link libcrypto.a and libssl.a
But when compiling I get an error "Undefined symbol: atexit"  :'(

I wrote a demo project with which you can repeat this mistake.

To get libcrypto.a and libssl.a you need to compile OpenSSL 1.0.2:

./Configure mingw64 --cross-compile-prefix=x86_64-w64-mingw32- mingw64
make

the files will be in the root of the openssl directory, they need to be put in the directory with the project

Can someone suggest how to fix it?

thanks in advance.

marcov:
Make sure your EXE links to all the relevant mingw libraries that are dependencies. mingw's libc and mingwex etc. You might want to look at the packages/gdbint/src package, because that linked mingw libraries statically in the past.

RDL:
@marcov
@jamie

Yes, all registers are respected.
I added

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---{$linklib /usr/x86_64-w64-mingw32/lib/libmsvcr120.a} and the demo project compiled.

But my real project doesn't compile and throws a different error. I will finish the demo project later to show it to you.

RDL:
I updated the demo project.
The whole point is that if you refer to any procedure / function openssl in the code, then the project does not compile.

If between begin - end remove

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---OpenSSL_add_all_ciphers;The project will compile successfully.

Any ideas about this?

Thaddy:
Yes, openssl deprecated a lot of cyphers in recent versions, but they are still in the Pascal bindings/header file.
The minimum is now tls 1.1. the recommended is tls 1.3.

Navigation

[0] Message Index

[#] Next page

Go to full version