Johann 'Myrkraverk' Oskarsson
2018-01-01 12:57:38 UTC
Dear Open Watcom,
How do you create dynamic link libraries for Dos/4gw? So far
I have this source code.
// file: foo.h
char * __export foo( void );
// end: foo.h
// file: foo.c
#include "foo.h"
char * __export foo( void ) {
return "bar";
}
// end: foo.c
and this make file.
## file: Makefile
foo.dll: foo.obj
wlink system 386 dll option map name foo file foo
foo.obj: foo.c
wcc386 -bt=386_dll -6r foo.c
## end: Makefile
Wlink tells me it's
creating DOS/4G dynamic link library
so I know I have most of the steps correct. However,
file foo.obj: undefined symbol __CHK
(slightly edited)
How do I get rid of that undefined symbol? If I link with
the C library, clib3r, it finds __CHK but complains about
a missing main_. Do I need a main() in a DLL? Will that
not conflict with the application's main()?
How do you create dynamic link libraries for Dos/4gw? So far
I have this source code.
// file: foo.h
char * __export foo( void );
// end: foo.h
// file: foo.c
#include "foo.h"
char * __export foo( void ) {
return "bar";
}
// end: foo.c
and this make file.
## file: Makefile
foo.dll: foo.obj
wlink system 386 dll option map name foo file foo
foo.obj: foo.c
wcc386 -bt=386_dll -6r foo.c
## end: Makefile
Wlink tells me it's
creating DOS/4G dynamic link library
so I know I have most of the steps correct. However,
file foo.obj: undefined symbol __CHK
(slightly edited)
How do I get rid of that undefined symbol? If I link with
the C library, clib3r, it finds __CHK but complains about
a missing main_. Do I need a main() in a DLL? Will that
not conflict with the application's main()?
--
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk
Johann | email: invalid -> com | www.myrkraverk.com/blog/
I'm not from the Internet, I just work there. | twitter: @myrkraverk