Linker error MyDac 4.4 BCB5

Discussion of open issues, suggestions and bugs regarding MyDAC (Data Access Components for MySQL) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Laco
Posts: 5
Joined: Fri 09 Feb 2007 11:12

Linker error MyDac 4.4 BCB5

Post by Laco » Fri 09 Feb 2007 11:16

i try do this code

Code: Select all

    TMyConnection *conn;

    conn = new TMyConnection(this);

    conn->Port = 3306;
    conn->Server = "host";
    conn->Username = "login";
    conn->Password = "password";
    conn->LoginPrompt = false;
    conn->Database = "mydb";
    conn->Connected = true;
    conn->Connected = false;

    delete conn;
And i have this linker error:

Unresolved external '__fastcall Myaccess::TMyConnection::SetDatabase(System::AnsiString)' referenced from D:\PROJEKTY\#ROZNE\MYSQL\UNIT1.OBJ

I was looking for some lib missing but no success.

Any advise for me?

Regards Laco.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 09 Feb 2007 12:12

This looks like paths to MyDAC files are missing in the IDE options. Please check that the following paths are present in the Library Path accessible from Tools | Environment options | Library:
%MyDAC%\Lib
%MyDAC%\Include

%MyDAC% is the MyDAC installation path on your computer.

Laco
Posts: 5
Joined: Fri 09 Feb 2007 11:12

Path is not a problem. :(

Post by Laco » Fri 09 Feb 2007 14:33

I forgot to say that if i use componets staticaly (putting them on form and setting all property by design) it go well.

But i need make it all runtime and this is problem.

Nice is that also all necesary linked files are ok. If i comment that problem lines, it go evrithing ok. I can see data in grid and evrithing.

Seems that only some setters are not linked corectly, cause for port, user, and logint it has no problems.

Regards Laco

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 09 Feb 2007 15:39

Try to uninstall MyDAC and remove all the files concerned to it. Then install MyDAC one more time. To remove all vestiges of MyDAC, please follow these instructions:
  • 1) Close IDE
    2) Uninstall MyDAC
    3) Search for MyAccess.*, DBAccess.*, mydac*.bpl, dac*.bpl etc files at your HDD and delete them
    4) Remove from the project directory all files made by compiler and linker
    5) Remove from the registry (HKCU\Software\Borland\C++Builder\5.0\Known Packages) all the links to MyDAC packages (mydac*.bpl, dac*.bpl)
    6) Run IDE and check that it is started without errors
    7) Close IDE
    8) Install MyDAC once more

Laco
Posts: 5
Joined: Fri 09 Feb 2007 11:12

Noo!!!

Post by Laco » Mon 12 Feb 2007 08:51

1: after uninstall my BCB wont start again missing many bpl and dlls

(Im developing important projects on this PC I CANT REINSTALL IDE)!!!!!

2: so strat to give me more precise responses like complet list of your files
and precise locations, so i can restore my worstation (each day of my stop cost me hundreds of euros)

3: i need to know what i have to link with my project (exact file) not just noobish responds like uninstal and reinstall, im not nooby user, im developing for builder more then 10 years

4: i'm your client for long time, so pls dont let change my opignion about your services.

Laco
Posts: 5
Joined: Fri 09 Feb 2007 11:12

Nothing to do!

Post by Laco » Mon 12 Feb 2007 09:08

After big problems, i restored my IDE. Was clean, no resting files, neither registry keys. I made new installation of MyDac and i have still the same problem.

SO WHAT I NEED LINK WITH PROJECT TO HAVE THOSE SetDatabase available?

And i repeat this problem come out only if i use components dinamicaly, on design time it function well.


regards Laco.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Mon 12 Feb 2007 12:31

This looks like the problem is in your environment. I cannot reproduce this problem on my side. I and need some more information. Please send me your sample to evgeniyD*crlab*com and specify the full MyDAC installation path and the full path to your project.

Laco
Posts: 5
Joined: Fri 09 Feb 2007 11:12

Yep!

Post by Laco » Mon 12 Feb 2007 12:51

Yep its for sure somthing with my environment. I took other PC
installed new builder on and put MyDac too, there evrithing goes well.

Problem is that i cant reinstall IDE on my development PC :(

It has no sense send project to you, its just empty new application
with those code up specified in onClick handler of one button.

Paths:
MyDac: C:\Programmi\Borland\CBuilder5\MyDac
i post for you prj file, maby there is some link which make conflict.

Code: Select all




  
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
  
  
    
    
    
    
    
    
  
  
    
    
    
  
  
[Version Info]
IncludeVerInfo=0
AutoIncBuild=0
MajorVer=1
MinorVer=0
Release=0
Build=0
Debug=0
PreRelease=0
Special=0
Private=0
DLL=0
Locale=1049
CodePage=1251

[Version Info Keys]
CompanyName=
FileDescription=
FileVersion=1.0.0.0
InternalName=
LegalCopyright=
LegalTrademarks=
OriginalFilename=
ProductName=
ProductVersion=1.0.0.0
Comments=

[Excluded Packages]
C:\PROGRA~1\Borland\CBUILD~1\Projects\Bpl\ZDBWARECB5.BPL=Zeos Dbware Components
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSPrVwAdvc5.bpl=ExpressPrinting System Advanced PreviewWindow by Developer Express Inc.
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSdxDBTVLnkc5.bpl=ExpressPrinting System ReportLink for ExpressDBTree by Developer Express Inc.
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSdxInsLnkc5.bpl=ExpressPrinting System ReportLink for ExpressInspector by Developer Express Inc.
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSdxMVLnkc5.bpl=ExpressPrinting System ReportLink for ExpressMasterView by Developer Express Inc.
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSdxOCLnkc5.bpl=ExpressPrinting System ReportLink for ExpressOrgChart by Developer Express Inc.
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSdxDBOCLnkc5.bpl=ExpressPrinting System ReportLink for ExpressDBOrgChart by Developer Express Inc.
C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\dxPSdxFCLnkc5.bpl=ExpressPrinting System ReportLink for ExpressFlowChart by Developer Express Inc.
$(BCB)\Projects\Bpl\ZMySqlCB5.bpl=Zeos MySQL Components

[HistoryLists\hlIncludePath]
Count=3
Item0=$(BCB)\include;$(BCB)\include\vcl;C:\Programmi\Borland\CBuilder5\MyDac\Include\Item1=$(BCB)\include;$(BCB)\include\vcl;C:\Programmi\Borland\CBuilder5\MyDac\Include
Item2=$(BCB)\include;$(BCB)\include\vcl;C:\Programmi\Borland\CBuilder5\MyDac\Include;C:\Programmi\Borland\CBuilder5\Odac\Include

[HistoryLists\hlLibraryPath]
Count=3
Item0=C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib\;C:\Programmi\Developer Express Inc\ExpressMemData\C++Builder 5\Lib\;C:\Programmi\Developer Express Inc\ExpressEditors Library\C++Builder 5\Lib\;C:\Programmi\Developer Express Inc\ExpressQuantumGrid\C++Builder 5\Lib\;C:\Programmi\Developer Express Inc\ExpressCommon\C++Builder 5\Lib\;C:\Programmi\Developer Express Inc\ExpressInplaceEditors\C++Builder 5\Lib\;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;C:\Programmi\Borland\CBuilder5\MyDac\Lib\Item1=C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressMemData\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressEditors Library\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressQuantumGrid\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressCommon\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressInplaceEditors\C++Builder 5\Lib;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;C:\Programmi\Borland\CBuilder5\MyDac\Lib
Item2=C:\Programmi\Developer Express Inc\ExpressPrinting System\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressMemData\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressEditors Library\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressQuantumGrid\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressCommon\C++Builder 5\Lib;C:\Programmi\Developer Express Inc\ExpressInplaceEditors\C++Builder 5\Lib;$(BCB)\Projects\Lib;$(BCB)\lib\obj;$(BCB)\lib;C:\Programmi\Borland\CBuilder5\MyDac\Lib;C:\Programmi\Borland\CBuilder5\Odac\Lib

[HistoryLists\hlDebugSourcePath]
Count=1
Item0=$(BCB)\source\vcl

[HistoryLists\hlConditionals]
Count=1
Item0=_DEBUG

[Debugging]
DebugSourceDirs=$(BCB)\source\vcl

[Parameters]
RunParams=
HostApplication=
RemoteHost=
RemotePath=
RemoteDebug=0

[Compiler]
ShowInfoMsgs=0
LinkDebugVcl=0
LinkCGLIB=0

[CORBA]
AddServerUnit=1
AddClientUnit=1
PrecompiledHeaders=1

[Language]
ActiveLang=
ProjectLang=
RootDir=
  

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Tue 13 Feb 2007 10:53

I think that the quickest solution for you is to use content from your working project file.
Try to compare the working project file with the one that has problems. It is better to use a merge or comparation tool for this. Removing some links should solve the problem with MyDAC files linking.

Post Reply