Reputation: 141
I am trying to create a C++ application with opencv and share the application with other user who donot have Opencv installed on its PC. How can i do that?
I tried :
I was able to compile on my PC, but when i share my folder with some other PC and link all the libraries, I get undefined reference error for Opencv.
Thanks
Upvotes: 5
Views: 216
Reputation: 188
The answer is static linking. If you don't care about executable size and the target machine doesn't have the required libraries, just supply them inside the executable. Please look at this question for reference.
Upvotes: 1
Reputation: 207758
This answer has security implications - inform yourself before using and only use on a private network.
You could let the other user ssh
into your PC and forward the X11 connection to his own machine using the -X
or -Y
options.
So, the other user would do:
ssh -Y someUser@yourPC yourApp
You will need to think about whether you want to trust that person to login as you, or whether you wanted to make a different user on your PC that could only run your specific app and no other.
Another option might be to let the other user make his X11 display available to your PC, by him typing the following on his machine:
xhost +
Then, you could start your app on your machine, but with the display forwarded to his machine - that way he doesn't need to log in to your machine or have your password:
DISPLAY=<otherPC>:0 yourApp
Upvotes: 0