How in MSVS C++, work on multiple projects of different solutions?

9 views Asked by At

I created two projects in different Solutions. Project1 Calculator which is Static Lib(.lib) containing multiple functions and Project2 Trigger which is Application Exe(.exe) is try to use the functions of Calculator. How can I do this in Microsoft Visual Studio.

  1. I tried to Link the path of Calculator.lib in Trigger >> Linker >> General >> Addition Libraries Directories and Trigger >> Linker >> Input >> Additional Dependencies. But It did not work. It is giving Error : Error 1 error LNK2019: unresolved external symbol "double __cdecl opt::add<int,int>(int,int)" (??$add@HH@opt@@YANHH@Z) referenced in function _main D:\Projects\CppCon\Trigger\Trigger\Master.obj Trigger Error 2 error LNK1120: 1 unresolved externals D:\Projects\CppCon\Trigger\Debug\Trigger.exe 1 Trigger 1
1

There are 1 answers

0
Vikas Prajapati On

Way 1. Add a new solution folder and clone the solution and use it. Way 2. Get the correct path and paste in the C/C++ > General and build it.