0

I have a C++ application and want to extend it with a graph tool. I found a great tool (Plotlab) with an example code (C++).

Now I was able to add the project in my project map with my app but I have no idea how I can communicate from my app code to the tool example code....

I'm using Visual Studio 2012.

If it is possible I don't want to insert all headers and source code to one project...

mhu
  • 17,720
  • 10
  • 62
  • 93
user2261524
  • 415
  • 3
  • 10
  • 17

2 Answers2

1

You can compile one of the project (probably Plotlab) to a lib (static (.lib) or dynamic(.dll)) and link to it (statically or dynamically) from the other project (probably your application)

Roee Gavirel
  • 18,955
  • 12
  • 67
  • 94
0

You can copy the source codes of the example project in this case Plotlab and then add those code files to your solution/project.

Semih Yagcioglu
  • 4,011
  • 1
  • 26
  • 43
  • There are plenty, you can add as a reference or else if it is another process you can pass parameters to be consumed by the other project. – Semih Yagcioglu Apr 09 '13 at 12:22
  • how can I pass parameters ? – user2261524 Apr 09 '13 at 12:41
  • You can pass the parameters when you start the external process as arguments. If you have data to pass that can't be simply passed as argument, then writing the data to a file from the first project and then reading it from the other project would be a better method. But for your case I would suggest compiling the Plotlab and then adding the dll's to your own project and then using it in your own project. – Semih Yagcioglu Apr 09 '13 at 13:02
  • how can I compile my whole tool project as dll ? – user2261524 Apr 09 '13 at 13:22
  • Have a look at this : http://msdn.microsoft.com/en-us/library/vstudio/ms235636.aspx – Semih Yagcioglu Apr 09 '13 at 13:25