Hi Greg,
Here are some thing you might look into.
1. Jserv.h is a generated file.The template file is jserv.in.h .There is
a
tool autochange.exe which reads in jserv.in.h and outputs jserv.h
i.e in Makefile.win32
jserv.h: autochange.exe
@autochange PACKAGE=$(PACKAGE) VERSION=$(VERSION) < jserv.h.in >
jserv.h
and autochange.exe itself is built from the autochange.c file.
i.e in Makefile.win32
autochange.exe: autochange.c
$(CC) autochange.c
2. Then comes the important thing that do you have jserv.in.h in your
ApacheJserv source code.
if you don't have it try getting it from Apache download section in
java.apache.org
In fact the version of Jserv 1.1b3 which I have contains this file.
From the errors you have received it seems your jserv.h file is
goofed up.
I have come across a situation where the jserv.in.h
file was missing and i tried "make clean" and it removed jserv.h
which is supposed to be
be regenerated again from the jserv.in.h file.
i.e. in Makefile.win32
##########
# Cleaning
##########
clean:
erase *.obj
erase *.idb
erase jserv.h
erase autochange.exe
erase ApacheModuleJServ.exp
erase ApacheModuleJServ.lib
erase ApacheModuleJServ.pch
Therefore it is imperative you have that file.
3. To build ApacheJserv with EAPI you will need the whole bunch of
source for
Apache,modssl,openssl,ApacheJserv.The reason is
Modssl adds EAPI handlers and hooks in the apache source code.Modssl
needs openssl
libraries and includes to modify the Apache source and makefiles.Once
this is done
Any DSO(DLL) module will need to be compiled with EAPI=ON to take
advantage of the
Extended API.The question will come to your mind where to get apache
,modssl,openssl
source and the HOWTO's ,try OpenSA.
4. If you use OpenSA's build instructions you will need to tweak
Makefile.win32 to help
it find the header and library files from the apache directory.i.e
a )APACHE_SRC="d:\Program Files\Apache Group\Apache\src"
b )JSERV_C_INCL = /I$(APACHE_SRC)\include /I$(APACHE_SRC)\os\win32 /I.
c )JSERV_L_OPTS = /nologo $(APACHE_SRC)\CoreR\ApacheCore.lib
kernel32.lib user32.lib \
gdi32.lib winspool.lib comdlg32.lib advapi32.lib
shell32.lib \
wsock32.lib /subsystem:console /incremental:no
/machine:I386 \
/pdb:".\ApacheModuleJServ.pdb" /NODEFAULTLIB:LIBC
d )!IFDEF STANDALONE
build: jserv.h ApacheJServ.exe
echo Done.
!ELSE
build: jserv.h $(APACHE_SRC)\CoreR\ApacheCore.lib
ApacheModuleJServ.dll
echo Done.
!ENDIF
The reason you will need to tweak is OpenSA uses VC++ IDE environment
to build or use
VC++ generated makefile.VC++ puts the output in {source dir}\Debug
,{source dir}\Release
generally,those are the likely places you will find the
Apachecore.lib and other libraries.
Have fun,
PKD
Gregory Castro wrote:
>
> First of all, I would like to thanks Pranab Dhar for the patience and
> help.
>
> Unfortunately, I can't compile JServ correctly yet. In this meantime
> I've tried to found a C compiler (I get Microsoft Visual C++) and use de
> Makefile.win32 that comes with the Apache Jserv 1.0 distribution but
> without the proper experience with C language I'm getting in deep
> trouble.
>
> After some include archives problems that I was able to solve, I've come
> to these messages when invoking "nmake /f Makefile.win32 EAPI=ON":
>
> .\jserv.h (81): error C2143: syntax error: missing '{' before
> 'constant'
> .\jserv.h (81): error C2059: syntax error: ''
> .\mod_jserv.c (1258): error C2065: 'JSERV_NAME': undeclared
> identifier
> .\mod_jserv.c (1258): error C4047: 'function': 'const char *'
> differs in levels of
> indirection from 'int'
> .\mod_jserv.c (1258): warning C4024: 'ap_add_version_component':
> different
> types for formal and actual parameter 1
> .\mod_jserv.c (1258): error C2143: syntax error: missing ')' before
> 'string'
> .\mod_jserv.c (1258): error C2059: syntax error: ')'
> NMAKE: fatal error U1077: 'C:\ARQUIV~1\DEVSTU~1\VC\BIN\cl.exe':
> return code '0x2'
> Stop.
>
> I know that, without the source code of Apache JServ that I have will be
> almost impossible to help me, but the intention to put these messages
> was more to know a direction than a direct solution.
>
> Moreover, if this is a source code problem (considering the first
> message), I would like to know if anybody here has a JServ 1.0 code that
> compiles correctly.
>
> Thank you all once more.
>
> Gregory Castro.