httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <>
Subject RE: "free" borland C++ compiler
Date Fri, 23 Jun 2000 03:26:33 GMT
> From: []
> Sent: Tuesday, June 20, 2000 8:13 PM
>>>From attached

I use a special .DEF file for lots of reasons
( Quick sets of stack and heap sizes ( standard ) and a few other
Borland specific things ) and for Borland this usually requires
a slight change to main_win32.c.

I take the '__declspec(dllexport)' off of the
'apache_main()' prototype in main_win32.c because
it's not needed as long as you are using a .def file.

So main_win32.c ends up like this...
( I also add <stdio.h> so I can 'printf()' in main_win32.c )

#ifdef __BORLANDC__
#include <stdio.h> /* For some new debug printf() calls */
int apache_main(int argc, char *argv[]);
__declspec(dllexport) int apache_main(int argc, char *argv[]);

I then use a .DEF file for ApacheR.EXE called 'ApacheR.def'
which looks like this...

IMPORTS ApacheCore._apache_main

NOTE the 'underscore' on the IMPORT statement!!

You have to have this or you get all kinds of
'Can't find apache_main() entry point' errors
during compile and/or runtime.


Attached is the current 'iteration' of the perl script.

I realize you and Ozgar are both dedicated Borland afficiandos,
but we need to maximize compatibility, not exploit features for
the public release.  (Yes, I realize we have done so with MSVC,
and no more 'on purpose' than either of you propose.)

The def for the IMPORTS tag will definately be verboten.  May
I ask, does ilink32 have not -one- blinking option to create
the implib???  Forget the IMPORTS nonesense, since that makes
modules a nightmare.  So let me know if we have to invoke implib
on the libraries we create in a second operation.  (I -really-
hoped to avoid that!)

Feel free to comment on the flag options!  I think your notes
misspoke about CW32MTI (the name implies to me this is the import 
lib for the dynamic library, but I could be wrong.)  Pull down
tonight's tree and whack it with  And yes, it
won't build past the .dll - since there is no ApacheCore lib to 
link with (and as I said, we need to fix it right.)

Also, the free bcc5.5 product states you may list options in the
ilink32.cfg file in the borland binaries folder.  Hogwash, or
so it appears.  It also appears you cannot actually use a LIB env.
variable, either.  I did manage to configure the bcc32.cfg file
for the bcc32 paths, but have no friggin clue how to get the linker
paths set up.  

Some asides, I'm avoiding pulling in that 1MB monstrosity 
IMPORT32.lib, and did path the psdk folder they provide.  The extra
kernel32.lib in some cases is a result that their implib's don't
resolve their own imports for the c libs, and chaos ensues.  That's
how I found my way to the MTI libs, since they only really 'link'
directly to kernal, rather than the whole gobs.

One last thought; If done right, no one knows the difference if they 
are loaded by a borland or ms compiled ApacheCore.dll - and module 
writers will cheer :)


View raw message