C++ constant static vector instantiation
-
@SGaist Can you please provide a link to an article/Documentation which you think would help me out. Thank you very much.
@faiszalkhan https://doc.qt.io/qt-5/third-party-libraries.html
Hint: -lLIBNAME is missing in your pro file. -
@faiszalkhan https://doc.qt.io/qt-5/third-party-libraries.html
Hint: -lLIBNAME is missing in your pro file.@jsulm @SGaist I checked the documentation, found it straightforward and made the changes but I'm still not able to get past this issue. I changed the command to :
LIBS += -L"third_party/license++/exe" -lliblicensepp
I'm compiling on macOS with QT creator 5.9. I tried all the permutations and combinations for the path but it doesn't seem to work.
Error :
ld: warning: directory not found for option '-Lthird_party/license++/exe' ld: library not found for -lliblicensepp clang: error: linker command failed with exit code 1 (use -v to see invocation)
Please help.
-
@faiszalkhan said in C++ constant static vector instantiation:
LIBS += -L"third_party/license++/exe" -lliblicensepp
Hint: -lLIBNAME is missing in your pro file.
I don't think your libname is '-L"third_party/license++/exe" -lliblicensepp' but licensepp ...
-
@faiszalkhan said in C++ constant static vector instantiation:
LIBS += -L"third_party/license++/exe" -lliblicensepp
Hint: -lLIBNAME is missing in your pro file.
I don't think your libname is '-L"third_party/license++/exe" -lliblicensepp' but licensepp ...
@Christian-Ehrlicher The name of the library is liblicensepp.dylib. I have prepended "-l" as mentioned in the documentation mentioned above.
-
when using -l{libname} you don't generally write -llib{libname} but just -l{libname}
-lmath is right, where -llibmath is wrong
-
@Kent-Dorfman Thank you for that. I made the change as follows
LIBS += -L"third_party/license++/exe" -llicensepp
Same error :(
-
The name of the library is liblicensepp.dylib.
No, the name is licensepp, the filename of the library is 'liblicensepp.dylib' (or 'liblicensepp.so' on linux or licensepp.dll on windows).
The directory should be absolute or correctly relative (which isn't as the compiler tells you).
-
@Christian-Ehrlicher thanks. Providing the absolute path worked. However, I'm not sure why the relative directory path doesn't work as it is straight forward. The relative path I give is relative wrt the .pro file as has been done for the headers and sources.
-
@faiszalkhan said in C++ constant static vector instantiation:
relative wrt the .pro file as has been done for the headers and sources.
it must be the relative one on where the linker is called.
-
@jsulm @SGaist @Christian-Ehrlicher @Kent-Dorfman Thank you very much.