Unsolved error : no such file or directory : 'source/libtomcrypt/mac/libtomcrypt.a'
-
I am trying to build my source code in mac in qt creator 5.11.1. But I get the same error. My file libtomcrypt exists exactly
in the same path where it says no such file or directory. Can anyone please help. -
Hi and welcome to devnet,
Where exactly is that library on your machine ?
How are you passing the path to it ? -
I generated the static library for libtomcrypt on Mac and copied libtomcrypt.a inside my project folder in the path - source/libtomcrypt/mac/libtomcrypt.a.
Also in my .pro file I added below lines -
macx{
LIBS += source/libtomcrypt/mac/libtomcrypt.a
} else {
LIBS += source/libtomcrypt/win/libtomcrypt.a
}
INCLUDEPATH += source/libtomcrypt/headersAfter runnung qmake, I gave 'build' which is throwing an error - no such file or directory : 'source/libtomcrypt/mac/libtomcrypt.a'
-
What if you use
LIBS += $$PWD/source/libtomcrypt/mac/libtomcrypt.a
? -
I tried giving only for mac --
LIBS += $$PWD/source/libtomcrypt/mac/libtomcrypt.a
INCLUDEPATH += source/libtomcrypt/headersIt gives me some other error now -- Library not found for -lssl
-- linker command failed with exit code 1 (use -v to see invocation) -
Where are your OpenSSL libraries installed ?
-
its installed here - /usr/local/Cellar/openssl/1.0.2p
I just did brew install openssl to confirm if I have installed openssl or not, I noticed few other things in the terminal logs -
- This formula is keg-only, which means it was not symlikned into /usr/local, because apple has deprecated use of openssl in favor of its own TLS and crypto libraries.
- For compilers to find this software you may need to set :
LDFLAGS : - L/usr/local/opt/openssl/lib
CPPFLAGS: - L/use/local/opt/openssl/include
Do I need to set these flage? If yes, where and which file do I need to add this change?
-
- Yes, that's what Qt is using for some releases now: the SecureTransport framework.
- That should be in the
LIBS
andINCLUDES
variables.
-
This post is deleted! -
You do realise that you are already using
LIBS
andINCLUDEPATH
in your .pro file ? -
Oh yes, I have added that in .pro file. I am sorry for the stupid question.
But do you have any idea why it still gives error - library not found for -lssl? -
Please show your complete .pro file.
And where exactly is your libssl located and if you use the links from
/usr/local/opt
check that they are pointing to something valid. -
This post is deleted! -
To ensure the existence of libssl
-
" ls -l /usr/local/opt/openssl" gives the output -
lrwxr-xr-x 1 katopz admin 24 Aug 20 15:21 /usr/local/opt/openssl -> ../Cellar/openssl/1.0.2p
-
"whereis openssl" gives output -
/usr/bin/openssl
-
-
I don’t see any line pointing to /use/local/opt for the includes nor the libraries.
-
I have added those library files inside my project folder and folder structure is like -
source ---> openssl ----> mac ---->x64 , libcrypto.a , libssl.a
(inside x64 folder also 2 files ae there - libcrypto.a , libssl.a )In .pro file it is mentioned like -
macx{
INCLUDEPATH += ./source/openssl
./source/openssl/macLIBS += -L./source/openssl/mac/x64 -lssl \ -L./source/openssl/mac/x64 -lcrypto
}
-
Then you should rather use
$$PWD
to ensure you have the correct full path. -
@SGaist : Tried $$PWD as well,, didn't help..
-
Do you see any of these paths in the generated Makefile ?