user1046481
user1046481

Reputation: 1

sharing Variables between Visual C++ Projects

I am using OpenCV to find golf balls. I have already found the coordinates of the ball and I now want to send these coordinates to another VC++ project which does the communication of the project. I want to know how do I declare the variable so that it can be accessed in another project in the solution

Upvotes: 0

Views: 716

Answers (1)

Luchian Grigore
Luchian Grigore

Reputation: 258618

If the two projects run separate processes, you will need IPC (inter-process communication). There's a Boost library for that.

If your projects run only one process, say one is an exe and one is a dll, you can link your exe to the dll and pass the values via a global used by both the exe and the dll (not recommended) or via function calls (i.e. create an object from the dll and call a set function with your values or something like that).

Upvotes: 1

Related Questions