Mail Archives: djgpp/2000/06/10/11:00:48
I've tried out what you suggested and downloaded SEAL (nice
thing!)
I am no longer having problems with libraries in DLX
modules, but I discovered 2 new problems:
- My DLX loader can't execute an exported function of my
DLX module (it leads to a general protection fault [but I'm
using Windows, so I'm used to that;-)...])
I can call my routine in the LibMain procedure of my DLX,
for example:
DLX_FN void testproc(void) { /* do something */ }; DLX_EF
lib_begin ( void ) {
if ( ap_process == AP_ALLOC ) {
AP_EXPORTLIB();
};
if ( ap_process == AP_INIT ) {
testproc(); /* works perfectly */
};
} lib_end;
but I can't import "testproc" to my DLX loader like this:
typedef void (*FUNC)();
hdlx_t myd1;
int main(void)
{
DLXImport(_LIBEXPORTTABLE);
myd1 = DLXLoad("tstdlx.dlx", "");
((FUNC)DLXGetEntry(myd1,"testproc"))(); /* GPF!!! */
DLXUnload(myd1);
}
- and a second problem: "extended DLX" does not support C++:
If I try to generate a DLX from an C++ object file (i.e.
when the file extension is .cpp or .cc or when I'm using
GPP instead of GCC), DLXGEN can't create a DLX ("Error:
input file has more than one section; use -M for map").
Is there a way to make DLXGEN C++ compatible???
Finally a tiny bug correction for SEAL's DLX.H file:
please use
#define app_end } DLX_EF
#define app_main ap_begin
#define app_begin(_x) \ /*...*/
and
#define lib_end } DLX_EF
#define lib_main lib_begin
#define lib_begin(_x) \ /*...*/
instead of declarations without DLX_EF since one "}" is
missing when compiling a C++ file with it [this bug is so
tiny that my correction suggestion could be regarded
as "cosmetic"]...
Thanks in advance...
* Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
- Raw text -