BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

More DLL Problems

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++)
View previous topic :: View next topic  
Author Message
Michael Corby
Guest





PostPosted: Sat Apr 21, 2007 8:14 pm    Post subject: More DLL Problems Reply with quote



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





PostPosted: Sun Apr 22, 2007 6:45 am    Post subject: Re: More DLL Problems Reply with quote



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?

Quote:
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





PostPosted: Sun Apr 22, 2007 6:33 pm    Post subject: Re: More DLL Problems Reply with 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...
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





PostPosted: Mon Apr 23, 2007 9:11 pm    Post subject: Re: More DLL Problems Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Language C++) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.