0

I am using a static library and creating another static library. Then I am using my test application to test my library.

I am able to successfully build both the library(statically build) and the test application. But, when I am trying to run the application I am getting error,

Unable to start program 'C:\Users\LT-BPant\documents\visual studio 2013\Projects\Test_Lib\Debug\Lib_1.lib'.

TO explain,

SDK_C(in C) static library -----> SDK_CPP(in C++, this is written by me and it is using SDK_C) -----> Test_SDK (using SDK_CPP). I am getting errors in this Test_SDK application..

I have set the correct path of the SDK_CPP in the Test_SDK project settings. DO I need to give all the path of SDK_C lib as well and all other dlls that are being used by SDK_C in Test_SDK? As per my knowledge, I should only give the path of the dependent dlls but not static library, since it is statically bound to the project and is needed at compile time.

Bhupesh Pant
  • 4,053
  • 5
  • 45
  • 70
  • Is SDK_CPP a DLL or a static library ? Does Test_SDK make direct calls to SDK_C, and if yes is this API declared extern "C" ? –  May 26 '14 at 13:24
  • Since the error apparently only involves your main program and your C++ library you should be able to reproduce with a similar reduced example, no C library complicating things. – Cheers and hth. - Alf May 26 '14 at 13:26
  • @YvesDaoust, SDK_CPP is static library. Test_SDK only calls SDK_CPP functions – Bhupesh Pant May 26 '14 at 13:44
  • @Cheersandhth.-Alf, I have started with the same thing and it worked for me previously!! – Bhupesh Pant May 26 '14 at 13:46
  • The missing reference does not seem to have any connection with the C library. –  May 26 '14 at 13:51
  • I have gone through the other reference link but that did not helped me at all... I am statically linking the library... – Bhupesh Pant May 27 '14 at 04:35

0 Answers0