I’m trying to link LexActivator V3 with a Linux application in Qt and getting the following:
nss.c;(.text+0xdf): undefined reference to `PK11_CreateDigestContext’
Also missing references to SSL_ImportFD (and others with SSL prefix), CERT_, and PR_, and so on. I can tell I’m missing a library, but I’m an utter novice with Linux and could really use some help.
A
Adnan KamiliCryptlex team
Hi,
Are you linking to the Lexactivator library statically or dynamically?
Which Linux distribution are you using for compilation of your code?
L
Lightburnsoftware
Static linking, Ubuntu 14 (though thinking of coming up to something more recent)
A
Adnan KamiliCryptlex team
You need to install libnss3, execute following command in terminal:
sudo apt-get install libnss3
Add following to your .pro file
unix:!macx:LIBS += -lrt -lssl3
Ensure you add this as dependency to your Linux packages.
L
Lightburnsoftware
The first part I can do. When you say “add this as a dependency” do you mean when deploying, or at build time?
Will have to wait for tomorrow - time for bed here.
A
Adnan KamiliCryptlex team
The machine which you use for compilation (building) you need to execute following command
sudo apt-get install libnss3-dev
And the machine where you deploy your application you need to add libnss3 as dependency either by ensuring your customers execute following command:
sudo apt-get install libnss3
or adding it as dependency in your packages which you distribute to your customers.
L
Lightburnsoftware
Closer - now I get only this error:
/usr/bin/ld: /home/username/JLaser/extern/lexactivator/unix-64/libLexActivator.a(libcurl_la-nss.o): undefined reference to symbol ‘CERT_GetDefaultCertDB@@NSS_3.2’
//usr/lib/x86_64-linux-gnu/libnss3.so: error adding symbols: DSO missing from command line
L
Lightburnsoftware
Never mind, I figured out the remaining missing libs (-lrt -lssl3 -lnss3 -lnspr4)
C
Cryptlex Support
Following is the list of all libs needed if compiling statically:
-lpthread -lssl3 -lnss3 -lnspr4
-lrt is only required if targeting older gcc compiler