Undefined symbol: atexit lazarus / 21-General ---------------------------------------------------------------------- RDL · 2022-01-23 09:51 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 · 2022-01-23 10:15 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 · 2022-01-23 14:47 @marcov @jamie Yes, all registers are respected. I added Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i {$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 · 2022-01-23 15:35 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  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i OpenSSL_add_all_ciphers;The project will compile successfully. Any ideas about this? ---------------------------------------------------------------------- Thaddy · 2022-01-23 15:44 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. ---------------------------------------------------------------------- RDL · 2022-01-23 15:48 @Thaddy I am currently trying to work with openssl 1.0.2 ---------------------------------------------------------------------- RDL · 2022-01-24 13:21 Spent all day again today trying to get rid of the error from "demo2' Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i project1.lpr(16,1) Error: Internal error 200603061 But all my attempts are unsuccessful Does anyone have any idea? ---------------------------------------------------------------------- Red_prig · 2022-01-24 13:41 that is compiler bug, use version FPC 3.3.1 or higher ---------------------------------------------------------------------- RDL · 2022-01-24 14:04 @Red_prig I updated FPC to version 3.3.1 My demo project "demo2" compiled successfully. In addition, my real project is also successfully compiled and works great. Thanks a lot to all the participants.