|
Home > Archive > Web Servers on Windows > February 2004 > unresolved symbol ap_hook_check_user_id
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
unresolved symbol ap_hook_check_user_id
|
|
| chetan 2004-02-08, 11:46 am |
| Hello,
I am using Apache 2.0.47 in Windows 2000. I have installed from
the binaries. I am trying to make a DSO. During linking I am getting
the error
error LNK2001: unresolved external symbol _ap_hook_check_user_id
: fatal error LNK1120: 1 unresolved externals
My DSO module is contains
static void register_hooks(pool *p)
{
ap_hook_check_user_id(ckuser,NULL,NULL,A
PR_HOOK_MIDDLE);
ap_hook_post_config(post_config,NULL,NUL
L,APR_HOOK_MIDDLE);
ap_hook_handler(explode, NULL, NULL, APR_HOOK_MIDDLE);
}
I am using Visual Studio 6.0 C++ Compiler and my compile command is as
follows
cl -Fo mydso.obj -c -Ox -MD -DWINNT -DNT -DWIN32 -D_POSIX_ -DANSI_C
../ap2incl -I.. -I../../incl -DAPACHE2 -DAP_ALLOC -D_REENTRANT
.../mydso.c
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 12.00.8804 for
80x86
Copyright (C) Microsoft Corp 1984-1998. All rights reserved.
When I look into the object module I see the following symbol
definitions
0:0000000 U __imp__ap_hook_handler@16
0:0000000 U __imp__ap_hook_post_config@16
0:0000000 U _ap_hook_check_user_id
My question is How come the function ap_hook_check_user_id appears as
_ap_hook_check_user_id instead of __imp__ap_hook_check_user_id@16
like the other functions.
Could anyone please let me know what am I missing.
Thanks
chetan.
| |
| Randy Kobes 2004-02-08, 11:46 am |
| "chetan" <chetan_j@hotmail.com> wrote in message
news:66edb483.0401221745.3cb4cb67@posting.google.com...
> Hello,
> I am using Apache 2.0.47 in Windows 2000. I have installed from
> the binaries. I am trying to make a DSO. During linking I am getting
> the error
>
> error LNK2001: unresolved external symbol _ap_hook_check_user_id
> : fatal error LNK1120: 1 unresolved externals
At the link stage, are you including libhttpd.lib, under Apache2\lib\?
best regards,
randy kobes
| |
| Marco Antoniotti 2004-02-08, 11:46 am |
| I have had a similar problem recently. The undefined symbol is
'apr_socket_send'. In which library is this defined? (This is for
Apache 2.0.*)
Thanks
Marco
Randy Kobes wrote:
> "chetan" <chetan_j@hotmail.com> wrote in message
> news:66edb483.0401221745.3cb4cb67@posting.google.com...
>
>
>
> At the link stage, are you including libhttpd.lib, under Apache2\lib\?
>
> best regards,
> randy kobes
>
>
>
| |
| Randy Kobes 2004-02-08, 11:46 am |
| "Marco Antoniotti" <marcoxa@cs.nyu.edu> wrote in message
news:3XEQb.500$Nq.115813@typhoon.nyu.edu...
> I have had a similar problem recently. The undefined symbol is
> 'apr_socket_send'. In which library is this defined? (This is for
> Apache 2.0.*)
Symbols with an 'apr' prefix are generally found either in
libapr.lib or libaprutil.lib (in this case, libapr.lib). If you have
VC++, you can use
dumpbin /exports library_name.lib
to see a list of symbols exported.
best regards,
randy
| |
| Marco Antoniotti 2004-02-08, 11:46 am |
|
Randy Kobes wrote:
> "Marco Antoniotti" <marcoxa@cs.nyu.edu> wrote in message
> news:3XEQb.500$Nq.115813@typhoon.nyu.edu...
>
>
>
> Symbols with an 'apr' prefix are generally found either in
> libapr.lib or libaprutil.lib (in this case, libapr.lib). If you have
> VC++, you can use
> dumpbin /exports library_name.lib
> to see a list of symbols exported.
Nope. apr_socket_send is in neither. It must be a misconfiguration of
some kind. But where should this symbol be?
Cheers
--
Marco
| |
| Randy Kobes 2004-02-08, 11:46 am |
| "Marco Antoniotti" <marcoxa@cs.nyu.edu> wrote in message
news:mAVQb.505$Nq.116525@typhoon.nyu.edu...
>
> Randy Kobes wrote:
>
> Nope. apr_socket_send is in neither. It must be a misconfiguration of
> some kind. But where should this symbol be?
It's in libapr.lib for me (Apache/2.0.48). What Apache version
are you using?
best regards,
randy
| |
| Marco Antoniotti 2004-02-08, 11:46 am |
|
Randy Kobes wrote:
> "Marco Antoniotti" <marcoxa@cs.nyu.edu> wrote in message
> news:mAVQb.505$Nq.116525@typhoon.nyu.edu...
>
>
>
> It's in libapr.lib for me (Apache/2.0.48). What Apache version
> are you using?
I am using 2.0.40
However, er, I was cheating. I am actually running Linux RH9. There
is no trace of 'apr_socket_send' in libapr.so.
I guess is a misconfiguration of the Ximian version I downloaded with
Red Carpet.
Anyway, thanks for the feedback
Cheers
--
Marco
| |
| chetan 2004-02-08, 11:46 am |
| >
> At the link stage, are you including libhttpd.lib, under Apache2\lib\?
>
> best regards,
> randy kobes
Thanks randy for the response.
Yes I do have the libhttpd.lib in my link. Here is my link command.
link /dll /out:mydso.so mydso.obj e:\Apache2\lib\libhttpd.lib
e:\Apache2\lib\libapr.lib
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
Creating library mydso.lib and object mydso.exp
mydso.obj : error LNK2001: unresolved external symbol
_ap_hook_check_user_id
mydso.so : fatal error LNK1120: 1 unresolved externals
The other symbols from libhttpd.lib are getting resolved with out any
problem, except this one.
0:0000000 U __imp__ap_hook_handler@16
0:0000000 U __imp__ap_hook_post_config@16
0:0000000 U _ap_hook_check_user_id
Thanks
chetan
|
|
|
|
|