Page 1 of 1
Problem with Component
Posted: Wed 20 Oct 2010 09:20
by Fastex
When I create a new project in Rad studio 2007/2009/2010/XE, I use TUniConnection and TAccessUniProvider, but when I compile the project, I get the Error :[ILINK32 Error] Fatal: Unable to open file 'ACCESSUNIPROVIDER.OBJ'.
I tried to find that file on my computer, but it isn't there.
I tried to use UniDAC on C++ Builder 6.0, this error was there, but I wrote links of includes and libraries in the project options. After it worked fine, because file ACCESSUNIPROVIDER.OBJ is in folder \UniDac for CBuilder 6\Lib\.
When I tried to do it in Delphi, it works fine.
How can I fix that problem ?
Posted: Wed 20 Oct 2010 09:54
by AlexP
Hello,
To use AccessUniProvider with C++ Builder you should replace the following code
#pragma link "AccessUniProvider"
#pragma link "ODBCUniProvider"
with
#pragma link "accessprovider150.lib"
#pragma link "odbcprovider150.lib "
where XXX - is the version of your IDE
accessprovider110.lib - Rad Studio 2007
accessprovider120.lib - Rad Studio 2009
accessprovider140.lib - Rad Studio 2010
accessprovider150.lib - Rad Studio XE
it work for all of the UniProviders.
Posted: Wed 20 Oct 2010 10:30
by Fastex
AlexP wrote:Hello,
To use AccessUniProvider with C++ Builder you should replace the following code
#pragma link "AccessUniProvider"
#pragma link "ODBCUniProvider"
with
#pragma link "accessprovider150.lib"
#pragma link "odbcprovider150.lib "
where XXX - is the version of your IDE
accessprovider110.lib - Rad Studio 2007
accessprovider120.lib - Rad Studio 2009
accessprovider140.lib - Rad Studio 2010
accessprovider150.lib - Rad Studio XE
it work for all of the UniProviders.
Can you write example of code, please ?
Posted: Wed 20 Oct 2010 11:07
by Fastex
I wrote the code
Code: Select all
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "accessprovider150.lib"
#pragma link "odbcprovider150.lib "
#pragma link "DBAccess"
#pragma link "Uni"
#pragma link "UniProvider"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
But now error :[ILINK32 Error] Fatal: Unable to open file 'ODBCPROVIDER150.LIB .OBJ'
Posted: Wed 20 Oct 2010 13:43
by AlexP
This is a correct empty template of *.cpp file to work with AccessUniProvider in C++Builder 2009
Code: Select all
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "Unit1.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma link "accessprovider120.lib"
#pragma link "odbcprovider120.lib"
#pragma link "UniProvider"
#pragma link "DBAccess"
#pragma link "Uni"
#pragma resource "*.dfm"
TForm1 *Form1;
//---------------------------------------------------------------------------
__fastcall TForm1::TForm1(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
Posted: Wed 20 Oct 2010 16:42
by Fastex
I don't know that I'm doing wrong, but this code doesn't work in my programm. Compiler wants file 'Accessprovider.120.obj'
Why Accessuniprovider.obj is absent in UniDAC 2007+ folder? I don't understand, because that file is in UniDAC C++ Builder 6.0 folder. I tried do it on 2 different computers. In Borland C++ Builder 6.0 it works fine. In other versions it doesn't want to work
May be do it like this
http://www.devart.com/forums/viewtopic. ... hlight=obj
What do you think about it ?
Posted: Thu 21 Oct 2010 08:58
by AlexP
Hello,
It seems to be a RAD Studio bug. The installed package should be automatically added to the default list of included packages when you create a new project, but it doesn't always happen.
The correct *.lib files for C++ Builder 2007 are accessprovider105.lib and odbcprovider105.lib
If the method, mentioned above doesn't help, you can try doing it in the way as it was written in the topic
http://www.devart.com/forums/viewtopic. ... hlight=obj
Posted: Mon 18 Apr 2011 19:19
by John Lance
AlexP wrote:It seems to be a RAD Studio bug. The installed package should be automatically added to the default list of included packages when you create a new project, but it doesn't always happen.
Where should this appear in the C++Builder Rad Studio XE file set? I'm using Windows 7 Pro 64 bit, and the current C++Builder Pro XE version of the Embarcadero product.
I would like to manually finish the installation into C++Builder so that I'm not fooling around with library "hide and seek" while attempting to use the trial version of the product.
Please see:
http://www.devart.com/forums/viewtopic. ... 8404#68404
Thanks!
Posted: Thu 21 Apr 2011 08:21
by AlexP
Hello,
I have answered you by e-mail.