 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Michael Corby Guest
|
Posted: Sat Apr 21, 2007 8:14 pm Post subject: More DLL Problems |
|
|
Hi
BDS2006 (C++Builder).
A DLL with any of the following "TADOConnection", "TADOCommand",
"TADOTable->GetIndexNames()", "TADOCommand->Execute()",
"TADOQuery->SQL" will fail to build if the "Build With Runtime Packages"
project option is unchecked. Builds OK if checked.
Any workaround ?
Michael Corby |
|
| Back to top |
|
 |
Clayton Arends Guest
|
Posted: Sun Apr 22, 2007 6:45 am Post subject: Re: More DLL Problems |
|
|
| Quote: | A DLL with any of the following "TADOConnection", "TADOCommand",
"TADOTable->GetIndexNames()", "TADOCommand->Execute()",
"TADOQuery->SQL" will fail to build if the "Build With Runtime Packages"
project option is unchecked.
|
Fail how? What is the error message?
It works for me. Make sure that "adortl.lib" and "dbrtl.lib" are in your
"libraries" node of your bdsproj file.
- Clayton |
|
| Back to top |
|
 |
Michael Corby Guest
|
Posted: Sun Apr 22, 2007 6:33 pm Post subject: Re: More DLL Problems |
|
|
I added the 2 libs as you mentioned to the DLL project and it solved the
problem. Thanks.
For your information, examples of the errors as follows:-
[Linker Error] Error: Unresolved external '__fastcall
Adodb::TADOCommand::TADOCommand(Classes::TComponent *)' referenced from
C:\PROGRAM FILES\BORLAND\BDS\4.0\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDB.OBJ
[Linker Error] Error: Unresolved external '__fastcall
Adodb::TADOTable::GetIndexNames(Classes::TStrings *)' referenced from
C:\PROGRAM FILES\BORLAND\BDS\4.0\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDB.OBJ
[Linker Error] Error: Unresolved external '__fastcall
Adodb::TADOQuery::GetSQL()' referenced from C:\PROGRAM
FILES\BORLAND\BDS\4.0\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDB.OBJ
Only the ADO references mentioned caused Linker Errors. Many other ADO
references
in the DLL caused no Linker Error messages.
Michael Corby
"Clayton Arends" <nospam_claytonarends (AT) hotmail (DOT) com> wrote in message
news:462abe22$1 (AT) newsgroups (DOT) borland.com...
| Quote: | A DLL with any of the following "TADOConnection", "TADOCommand",
"TADOTable->GetIndexNames()", "TADOCommand->Execute()",
"TADOQuery->SQL" will fail to build if the "Build With Runtime Packages"
project option is unchecked.
Fail how? What is the error message?
Any workaround ?
It works for me. Make sure that "adortl.lib" and "dbrtl.lib" are in your
"libraries" node of your bdsproj file.
- Clayton
|
|
|
| Back to top |
|
 |
Michael Corby Guest
|
Posted: Mon Apr 23, 2007 9:11 pm Post subject: Re: More DLL Problems |
|
|
The following function works OK when used within a project :-
// Assemble End of Report message with to-days date and time
String EndOfReport() // Within Project
String __declspec(dllexport) EndOfReport() // DLL
{
String dateString, timeString, endOfReport;
dateString = Date();
timeString = TimeToStr(Time());
AV endOfReport = " End of Report --- Date Printed: " +
FormatDateTime("dddddd",dateString) + " at " +
timeString.SubString(1,5);
return endOfReport;
}
When called from a DLL it works the first time when printing a report.
When it is called a second time it fails with an AV on the line marked
and the debugger shows GETMEM.inc
Any help appreciated.
Michael Corby
"Michael Corby" <mcorby (AT) sapo (DOT) pt> wrote in message
news:462b6415$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I added the 2 libs as you mentioned to the DLL project and it solved the
problem. Thanks.
For your information, examples of the errors as follows:-
[Linker Error] Error: Unresolved external '__fastcall
Adodb::TADOCommand::TADOCommand(Classes::TComponent *)' referenced from
C:\PROGRAM FILES\BORLAND\BDS\4.0\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDB.OBJ
[Linker Error] Error: Unresolved external '__fastcall
Adodb::TADOTable::GetIndexNames(Classes::TStrings *)' referenced from
C:\PROGRAM FILES\BORLAND\BDS\4.0\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDB.OBJ
[Linker Error] Error: Unresolved external '__fastcall
Adodb::TADOQuery::GetSQL()' referenced from C:\PROGRAM
FILES\BORLAND\BDS\4.0\PROJECTS\DLLFILES\DEBUG_BUILD\DLLDB.OBJ
Only the ADO references mentioned caused Linker Errors. Many other ADO
references
in the DLL caused no Linker Error messages.
Michael Corby
"Clayton Arends" <nospam_claytonarends (AT) hotmail (DOT) com> wrote in message
news:462abe22$1 (AT) newsgroups (DOT) borland.com...
A DLL with any of the following "TADOConnection", "TADOCommand",
"TADOTable->GetIndexNames()", "TADOCommand->Execute()",
"TADOQuery->SQL" will fail to build if the "Build With Runtime Packages"
project option is unchecked.
Fail how? What is the error message?
Any workaround ?
It works for me. Make sure that "adortl.lib" and "dbrtl.lib" are in your
"libraries" node of your bdsproj file.
- Clayton
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|