Hi I am trying to merge two visual studio solution files into one and I have been having a difficult time calling one project to the other.
- I have Solution X which contains Project A, which is a console application to control camera.
- I have another solution Y which contains Project B produces a dll for another application to display plots.
After combining these two projects under one solution I made Project A to be a static library for Project B to call functions reside in Project A.
On Project B I added Project A's reference and also added a path to the include files of Project A.
I can build Project A independently, but I cannot build Project B. Visual studio complains as follows:
Severity Code Description Project File Line Suppression State
Error LNK1120 1 unresolved externals XOP3
C:\Users\xxx\Documents\project\pvcam_project\XOP3\VC\XOP3-64.xop 1
Severity Code Description Project File Line Suppression State
Warning LNK4098 defaultlib 'LIBCMT' conflicts with use of other libs;
use /NODEFAULTLIB:library XOP3
C:\Users\xxx\Documents\project\pvcam_project\XOP3\VC\LINK 1
Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol pl_pvcam_get_ver referenced in
function "void __cdecl DoWave(void * *)" (?DoWave@@YAXPEAPEAX@Z) XOP3
C:\Users\xxx\Documents\project\pvcam_project\XOP3\VC\XOP3.obj 1
I followed this as an example and was able to build https://msdn.microsoft.com/en-us/library/ms235627(v=vs.90).aspx
I would like to know:
- Is it a good idea to have project A as a static library for project B to access ? Should the project A be a dll ?
- From Solution Y I added a project A and updated the locations of include files and etc by following (How do I merge two different Visual Studio solutions?) Is this the easiest way to merge two solutions ?
- Lastly it is the most important one I am not sure how to resolve the compilation error.
Thank you very much for taking a look at my problem.