 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
raulmola Guest
|
Posted: Mon Oct 09, 2006 8:16 pm Post subject: TQuery in a runtime package |
|
|
Hello, i have a package, lets call it CommonFunctionspackage.bpl, and
an application that uses it. Inside this package i have an exported
function that looks as simple as this
extern PACKAGE void __fastcall Prueba();
void __fastcall Prueba()
{
TQuery *q= new TQuery(NULL); //-- Crashes here, in the new
delete q ;
}
If i compile it with mypackage.bpl included as a runtime package it
crashes
But if icompile statically ( without mypackage.bpl included as a
runtime package) it all goes ok.
Does anyone knows what could be the reason of this ?
This would mean that i couldn't do TQuery's in runtime packages, that
can't be possible. Am i missing something?
I want the packge to be a runtime package because, the package is
intended to contain functions common to several "exe", and i don't want
to compile every "exe" statically with this package . This is, i want
to make my "exes" modular
I can't debug into VCL because as i read out there, because it's not
possible to debug with runtime packages. |
|
| Back to top |
|
 |
raulmola Guest
|
Posted: Mon Oct 09, 2006 8:35 pm Post subject: Re: TQuery in a runtime package |
|
|
By the way... the error reported by borland debugger is this :
---------------------------
Debugger Exception Notification
---------------------------
Project modinvoicProject10A.exe raised exception class EAccessViolation
with message 'Access violation at address 406F1770 in module
'bdertl60.bpl'. Read of address 0000003C'. Process stopped. Use Step or
Run to continue.
---------------------------
OK Help
---------------------------
raulmola ha escrito:
| Quote: | Hello, i have a package, lets call it CommonFunctionspackage.bpl, and
an application that uses it. Inside this package i have an exported
function that looks as simple as this
extern PACKAGE void __fastcall Prueba();
void __fastcall Prueba()
{
TQuery *q= new TQuery(NULL); //-- Crashes here, in the new
delete q ;
}
If i compile it with mypackage.bpl included as a runtime package it
crashes
But if icompile statically ( without mypackage.bpl included as a
runtime package) it all goes ok.
Does anyone knows what could be the reason of this ?
This would mean that i couldn't do TQuery's in runtime packages, that
can't be possible. Am i missing something?
I want the packge to be a runtime package because, the package is
intended to contain functions common to several "exe", and i don't want
to compile every "exe" statically with this package . This is, i want
to make my "exes" modular
I can't debug into VCL because as i read out there, because it's not
possible to debug with runtime packages. |
|
|
| Back to top |
|
 |
raulmola Guest
|
Posted: Mon Oct 16, 2006 1:13 pm Post subject: Re: TQuery in a runtime package |
|
|
I found it myself !!!!
My exe was compiled with bdertl.bpl statically and my bpl was compiled
it with the bdertl.bpl dinamically and this caused this error. So take
care of which runtime packages you compile with your bpl and your exes.
As a rule i will compile all my bpls and exes with at least, the
common runtime packages as runtime packages in both.That is, if there
exists an A.EXE with X.BPL as a runtime package then, those Y.BPL that
A.EXE depends on, will be compiled with X.BPL as a runtime package(and
viceversa).
I hope this helps.
raulmola ha escrito:
| Quote: | By the way... the error reported by borland debugger is this :
---------------------------
Debugger Exception Notification
---------------------------
Project modinvoicProject10A.exe raised exception class EAccessViolation
with message 'Access violation at address 406F1770 in module
'bdertl60.bpl'. Read of address 0000003C'. Process stopped. Use Step or
Run to continue.
---------------------------
OK Help
---------------------------
raulmola ha escrito:
Hello, i have a package, lets call it CommonFunctionspackage.bpl, and
an application that uses it. Inside this package i have an exported
function that looks as simple as this
extern PACKAGE void __fastcall Prueba();
void __fastcall Prueba()
{
TQuery *q= new TQuery(NULL); //-- Crashes here, in the new
delete q ;
}
If i compile it with mypackage.bpl included as a runtime package it
crashes
But if icompile statically ( without mypackage.bpl included as a
runtime package) it all goes ok.
Does anyone knows what could be the reason of this ?
This would mean that i couldn't do TQuery's in runtime packages, that
can't be possible. Am i missing something?
I want the packge to be a runtime package because, the package is
intended to contain functions common to several "exe", and i don't want
to compile every "exe" statically with this package . This is, i want
to make my "exes" modular
I can't debug into VCL because as i read out there, because it's not
possible to debug with runtime packages. |
|
|
| Back to top |
|
 |
Powered by phpBB © 2001, 2006 phpBB Group .
|