Hallo,
I want to use the ODAC Components without the VCL inside of an own class . But unfortunately I receive a link - error "DATA.DBCONSTS.OBJ" can not be opened. In the class header I am including "DbAccess.hpp" and "Ora.hpp" and in the corresponding cpp-File I am using: #pragma link "DBAccess" and #pragma link "Ora".
I hope that somebody is able to help me. - Oh, I am using C++ Builder 10.2 for designing my programs.
Best regards
Andreas Höhenberger
Using TOrasession without VCL
Re: Using TOrasession without VCL
We tested the work of ODAC 10.1.3 without using VCL and found no problems. For testing, we created the simplest console application, the source code of which is below:
We successfully compiled this application and connected to Oracle DB using it. Please repeat the same steps in your test environment and let us know the results.
Code: Select all
#include "Ora.hpp"
#pragma hdrstop
#pragma argsused
#ifdef _WIN32
#include <tchar.h>
#else
typedef char _TCHAR;
#define _tmain main
#endif
#include <stdio.h>
#pragma link "Ora"
int _tmain(int argc, _TCHAR* argv[])
{
TOraSession *OraSession = new TOraSession(NULL);
OraSession->Server = "<your TNS Name>";
OraSession->Username = "scott";
OraSession->Password = "tiger";
OraSession->Connect();
return 0;
}
Re: Using TOrasession without VCL
Thank you for your answer. I tried it out, but I got the same error message.
So I guess, that there could be something wrong with my compiler and linker settings, but I have no idea, what I should change.
best regards
Andreas Höhenberger
So I guess, that there could be something wrong with my compiler and linker settings, but I have no idea, what I should change.
best regards
Andreas Höhenberger
Re: Using TOrasession without VCL
Perform the next step. Open the * .cbproj file of your project in any test editor and find the "FrameworkType" tag in it. Specify in it the following value:
Save the result and compile the project in RAD Studio again
Code: Select all
<FrameworkType>None</FrameworkType>
Re: Using TOrasession without VCL
Hallo,MaximG wrote:Perform the next step. Open the * .cbproj file of your project in any test editor and find the "FrameworkType" tag in it. Specify in it the following value:Save the result and compile the project in RAD Studio againCode: Select all
<FrameworkType>None</FrameworkType>
the specified tag is OK. I made my class now inside a vcl-based application and tried to build my program and it worked. So I guess, that compiling with the VCL framework does something different. It seems, that one or more paths will not be found.
Re: Using TOrasession without VCL
For a detailed analysis of the issue, please compose and send us the simplest console application, the compilation of which causes the described error. You can do this via the e-support form (https://www.devart.com the "Support"\"Request Support" menu)