Programming => General => Topic started by: RDL on January 23, 2022, 10:51:59 am
Title: Undefined symbol: atexit
Post by: RDL on January 23, 2022, 10:51:59 am
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.
Title: Re: Undefined symbol: atexit
Post by: marcov on January 23, 2022, 11:15:24 am
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.
Title: Re: Undefined symbol: atexit
Post by: RDL on January 23, 2022, 03:47:36 pm
Title: Re: Undefined symbol: atexit
Post by: Thaddy on January 23, 2022, 04:44:54 pm
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.
Title: Re: Undefined symbol: atexit
Post by: RDL on January 23, 2022, 04:48:24 pm
@Thaddy I am currently trying to work with openssl 1.0.2
Title: Re: Undefined symbol: atexit
Post by: RDL on January 24, 2022, 02:21:12 pm
Spent all day again today trying to get rid of the error from "demo2'
Title: Re: Undefined symbol: atexit
Post by: Red_prig on January 24, 2022, 02:41:39 pm
that is compiler bug, use version FPC 3.3.1 or higher
Title: Re: Undefined symbol: atexit
Post by: RDL on January 24, 2022, 03:04:22 pm
@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. :)