Post migration of VC++ project from VS2010 to VS2019 - application is throwing error while running

Chandra Sekhar K 40 Reputation points
2023-03-24T10:39:31.7633333+00:00

After migration a VC++ windows service from VS2010 to VS2019, when I try to run the application (Debug mode) I am getting error like

RuntimeError

Project has both libraries orasql9.lib and orasql12.lib. But, we will be using only orasql12.lib only. So, I have excluded orasql9.lib from build from file properties and included orasql12.lib for build.

Even I have tried to remove the ora 9 library but no luck. With the release mode, it is giving same error for orasql12dll.

My VDI is already having Oracle 12 client installed.

Please suggest if I am missing any component in my machine. I am from .net background and new to VC++.

Developer technologies | Visual Studio | Other
{count} votes

Accepted answer
  1. RLWA32 49,636 Reputation points
    2023-03-24T11:55:52.65+00:00

    Since your question relates to third party software (Oracle) I cannot say whether your code should be using both Oracle 9 and Oracle 12 or only binaries from one version.

    The System Error message indicates that your code is using load-time linking for the Oracle dlls. From what has been said it seems that the Debug configuration is using Oracle 9 and the Release configuration is using Oracle 12. This apparently contradicts the statement "But, we will be using only orasql12.lib only." So you need to resolve this inconsistency for your Oracle usage and configure your project properties accordingly. As @Viorel has pointed out VS maintains separate project property settings for the various combinations of Platform/Configuration so make sure that you are adjusting the properties for the correct combinations. Sometimes its easier to adjust properties for All Platforms and All Configurations.

    As far as the run-time System Error is concerned, this indicates that the dlls in the error messages could not be located by the system when the .exe is loaded. You need to verify the file system location of the indicated Oracle dlls and ensure that location is one that will be searched by the system when loading dlls at run-time. The system search order is documented at Dynamic-link library search order.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.