Page 1 of 1

Unable to open file 'ORACLEUNIPROVIDER.OBJ'

Posted: Tue 26 Feb 2013 17:30
by gb2
This is probably an old issue with C++. I'm using XE3, Update 1, UniDac 4.5.10 (not the very latest - the changelog doesn't seem to touch these issues).

After creating a new project, just dropping a TOracleUniProvider on a form and attempting to compile will give the error:
[ilink32 Error] Fatal: Unable to open file 'ORACLEUNIPROVIDER.OBJ'

There seems to be an old solution from some years ago, to manually edit the .cbproj and add the required oraprovider170.lib on the "proper" place. That is kinda messy. Isn't there any cleaner solution?

I've been adding

#ifdef USEPACKAGES
#pragma link "OraProvider170.bpi"
#else
#pragma comment(lib, "oraprovider170")
#endif

to the main form .cpp (before the #pragma link "OracleUniProvider") and it *seems* to work, but I'm unsure if that's ok.

The second issue, maybe not related, is that if I enable madExcept (4.0.5) on that same project above that uses TOracleUniProvider, attempting to just launch the application will crash with:
---------------------------
Debugger Exception Notification
---------------------------
Project SimpleTest.exe raised exception class $C0000005 with message 'access violation at 0x00000000: read of address 0x00000000'.
---------------------------
Break Continue Help
---------------------------

Any ideas?

Project was compiled with all default options: Link with Dynamic RTL = true; Link with runtime packages = true;

Edit: Add the testing for USEPACKAGES

Re: Unable to open file 'ORACLEUNIPROVIDER.OBJ'

Posted: Wed 27 Feb 2013 10:40
by AlexP
Hello,

Unfortunately, for the time being, there is no other way to solve the problem, except replacing OracleUniProvider with oraprovider170.lib.
We have reproduced the problem with AV in ะก++Builder when using madExcept, however, we are not sure that the problem occurs due to our components, since there are no such problems with other utilities (FastMM, EurekaLog, etc.). We cannot reproduce the problem, as we haven't got the sources of this tool. Try to contact madExcept developers on the occasion of this problem.

P.S. Our latest DAC versions require Update 2 for Rad Studio XE 3

Re: Unable to open file 'ORACLEUNIPROVIDER.OBJ'

Posted: Wed 27 Feb 2013 11:36
by gb2
Thank you for the quick reply.

Regarding versions, we haven't updated yet to XE3 Update 2 because Update 3 must be right around the corner. Besides, if the AV was reproduced (on the current version I assume) just updating to the latest DAC won't solve it (for now at least). We'll try to reach madExcept author about this.

Now, for the unable to open OracleUniProvider.obj file, may I suggest to add something like the following to the OracleUniProvider.pas?

{$HPPEMIT '#ifdef USEPACKAGES'}
{$HPPEMIT '#pragma link "OraProvider170.bpi"'}
{$HPPEMIT '#else'}
{$HPPEMIT '#pragma comment(lib, "oraprovider170")'}
{$HPPEMIT '#endif'}

Because the IDE pulls up correctly the #include "OracleUniProvider.hpp" it will automatically be fixed.

If this is not followed, at least some pointers or hints on how to solve this on the UniDac.pdf, Readme.html or Help file would be really helpful.

Re: Unable to open file 'ORACLEUNIPROVIDER.OBJ'

Posted: Mon 04 Mar 2013 09:43
by AlexP
Hello,

Thank you for the sample, we will consider the possibility to use these directives to solve the problem with OBJ files.

Re: Unable to open file 'ORACLEUNIPROVIDER.OBJ'

Posted: Wed 06 Mar 2013 10:20
by gb2
Hi,

Regarding the crash, we've got reply from the madExcept author and it seems to not be related to his package. Example:

(1) Create a new BCB XE3 project.
(2) Drop a TUniConnection component on the main form.
(3) Add the following pas file to the project:

Code: Select all

unit test;

interface

implementation

uses Windows;

initialization
  GetVersion;
end.
Compile. Run. Crash.

Any hints?

Re: Unable to open file 'ORACLEUNIPROVIDER.OBJ'

Posted: Wed 06 Mar 2013 12:48
by AlexP
Hello,

We will research this behaviour and inform you as soon as we get any results