Cryptlex Forums

LexActivator dependencies on supported platforms

A
Andrew N Markin

Hello,


It looks like LexActivator depends on other libraries/frameworks. For example on MacOS I have to link CoreFoundation and SystemConfiguration to make it works. Right now I’m facing similar issues with linking of my application on Ubuntu 14.04 (seems it needs pthread and maybe something else). I’m using C/C++ static library with Qt application. Could someone please specify (or point to) complete list of dependencies on each platform to know what exactly should be additionally linked to product application? Thanks.
C
Cryptlex Support

Hi andrewnm,

The only dependency in Linux is lpthread and lrt in case you are compiling on an older distro.

Can you specify the exact error.

A
Andrew N Markin

Exact error is following:


/usr/bin/ld: /home/developer/Job/CryptlexResearch/Dependencies/LexActivator-Static-Linux/libs/amd64/libLexActivator.a(LexHelper.o): undefined reference to symbol ‘pthread_create@@GLIBC_2.2.5
/lib/x86_64-linux-gnu/libpthread.so.0: error adding symbols: DSO missing from command line

Any thoughts?
C
Cryptlex Support

Hi andrewnm,

I created a sample project on Ubuntu 14.04. Added LexActivator.h to the source files. Right clicked the project folder and clicked “Add Library” to add external static lib file in Qt Creator  which added following entries to the the .pro file:

unix:!macx: LIBS += -L$$PWD/…/Packages/Linux/LexActivator-Static-Linux/libs/amd64/ -lLexActivator
INCLUDEPATH += $$PWD/…/Packages/Linux/LexActivator-Static-Linux/libs/amd64
DEPENDPATH += $$PWD/…/Packages/Linux/LexActivator-Static-Linux/libs/amd64
unix:!macx: PRE_TARGETDEPS += $$PWD/…/Packages/Linux/LexActivator-Static-Linux/libs/amd64/libLexActivator.a


The project compiled successfully for Qt4 as well as Qt5 toolkit. No need to add pthread or any other dependency

A
Andrew N Markin

Just to clarify - did you actually use any LexActivator function in your sample project? If no - compiler can ignore that library and you will really get no errors… For proper test can you please add some LexActivator call(s)?

C
Cryptlex Support

I did call SetVersionGUID() function

C
Cryptlex Support

Sometimes in Qt when you update the pro file, you have to close the project, delete the pro.user file and debug and release folders and start again. You can also check following link:

http://stackoverflow.com/questions/19901934/strange-linking-error-dso-missing-from-command-line

A
Andrew N Markin

Yeah, I know those qmake issues, but I’m using CMake. But your link was helpful. The problem was in order of libraries passed to linker. In my case libLexActivator.a was added to linking list after pthread… changing of the order (by moving pthread to the end of the list) fixed the issue. Thank you!

A
Andrew N Markin

Hmm… and what’s about dependencies on Windows? I’m trying to link static library now (MSVC2010), and looks like:


1) I have to define something explicitly before including LexActivator.h (line LEXACTIVATOR_STATIC, right?)
2) LexActivator.lib depends on cURL? Do I have to link to libcurl_MD.lib?

And side question… looks like you’re using OpenSource components in client side libraries. Should I place reference to them into mine product (as it’s usually required with open source software)? If yes - is there complete list of such software to include it into my application acknowledgements (and to make sure I’m not violating anything)?
C
Cryptlex Support

Yes, you need to define LEXACTIVATOR_STATIC.

For static compilation you need to link to libcurl_MD.lib provided with the package.

LexActivator only uses MIT licensed open source libraries so you don’t need to include any acknowledgements.

A
Andrew N Markin

Hmm… ok. Also I suppose system Winhttp.dll should be linked as well, right? I’ve got unresolved symbol from that library on linking stage.

C
Cryptlex Support

Following is the list of AdditionalDependencies which you need to add:

ws2_32.lib;libcurl_MD.lib;shell32.lib;Winhttp.lib;

A
Andrew N Markin

Ok, thanks!

C
Cryptlex Support

I hope the issue is resolved

A
Andrew N Markin

Yes, I think so. I’ve got it working on all three platforms.

← Back to all topics · 15 posts · 2015 views · opened 2016-05-07