COVESA / capicxx-someip-tools

Common API C++ SOMEIP tooling
Mozilla Public License 2.0
76 stars 55 forks source link

Cannot find -lCommonAPI-SomeIP by using cmakelist.txt in my project #48

Closed anonymousAlpha-96 closed 6 months ago

anonymousAlpha-96 commented 6 months ago

hi team, I'm facing an issue while linking the -lCommonAPI-SomeIP library with the custom files. I've cloned from the github from cmake file at that time .so file is generated but after the I'm getting the error message as follows : /usr/bin/ld: cannot find -lCommonAPI-SomeIP Kindly suggest what could be the issue and how it can be resolved.

Thanks in advance.

anonymousAlpha-96 commented 6 months ago

@BrunoLSilvaCTW , @dibpinto could you please suggest any ways to resolve the issue.

BrunoLSilvaCTW commented 6 months ago

Hi @anonymousAlpha-96,

Can you post the command that you are running and the output? Also, can you share the steps you took to reproduce this issue?

Thanks.

anonymousAlpha-96 commented 6 months ago

hi, yup sure.

I'm attaching the cmakeList.txt CMakeLists.txt

commands which are used: mkdir out && cd out && cmake .. && make

Error snapshots:

image
BrunoLSilvaCTW commented 6 months ago

When running cmake, try passing the path to the libraries, like this:

cmake -DCMAKE_PREFIX_PATH="/full/path/to/libs;/full/path/to/more/libs" ..
anonymousAlpha-96 commented 6 months ago

We have installed all the libraries inside the out directory which is our binary directory. as you suggested we executed the command like _cmake -DCMAKE_PREFIXPATH=. .. but still, we are getting the error.

fatal error: CommonAPI/SomeIP/Deployment.hpp: No such file or directory 19 | #include <CommonAPI/SomeIP/Deployment.hpp> | ^~~~~~~~~ compilation terminated.

anonymousAlpha-96 commented 6 months ago

Issue resolved. Thanks for the support.