* RE: Q: apache: logresolve.c: undefined reference to `h_errno'
@ 2000-12-15 5:23 Josifovski Ljubomir-BLJ01Z
0 siblings, 0 replies; 4+ messages in thread
From: Josifovski Ljubomir-BLJ01Z @ 2000-12-15 5:23 UTC (permalink / raw)
To: 'Charles S. Wilson'; +Cc: Cygwin Mailing List (E-mail)
> The correct thing to do is to #include <netdb.h> in your source code.
I tried #including <netdb.h> at the top of logresolve.c, but I still get the
error.
(maybe I should include it somewhere else, or #define something?)
> The next best thing is to change
>
> extern int h_errno;
> to
> extern __declspec(dllimport) int h_errno;
This works.
Many thanks,
--
Ljubomir Josifovski
mailto:L.Josifovski@dcs.shef.ac.uk,blj01z@email.mot.com
http://www.dcs.shef.ac.uk/~ljupco
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: apache: logresolve.c: undefined reference to `h_errno'
2000-12-14 7:09 ` Patrick Doyle
@ 2000-12-16 8:23 ` Charles S. Wilson
0 siblings, 0 replies; 4+ messages in thread
From: Charles S. Wilson @ 2000-12-16 8:23 UTC (permalink / raw)
To: Patrick Doyle
Cc: Josifovski Ljubomir-BLJ01Z, 'cygwin@sourceware.cygnus.com'
The correct thing to do is to #include <netdb.h> in your source code.
The next best thing is to change
extern int h_errno;
to
extern __declspec(dllimport) int h_errno;
within your source code.
--Chuck
Patrick Doyle wrote:
>
> Not knowing any better, when I tried to compile wget, I just changed the
> reference to `h_errno' from:
>
> extern int h_errno;
>
> to
>
> /* extern */ int h_errno;
>
> in one place (ftp.c) and wget compiled fine. Having just read
> http://www.cygwin.com/ml/cygwin/2000-01/msg00452.html , I expect that was
> not the most correct thing to do, but it did allow me to compile and use
> wget. Perhaps you could do the same with apache.
>
> It's a hack, but it might be just enough to allow you to get your simple
> files-via-http service running.
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Q: apache: logresolve.c: undefined reference to `h_errno'
2000-12-14 6:47 Josifovski Ljubomir-BLJ01Z
@ 2000-12-14 7:09 ` Patrick Doyle
2000-12-16 8:23 ` Charles S. Wilson
0 siblings, 1 reply; 4+ messages in thread
From: Patrick Doyle @ 2000-12-14 7:09 UTC (permalink / raw)
To: Josifovski Ljubomir-BLJ01Z; +Cc: 'cygwin@sourceware.cygnus.com'
Not knowing any better, when I tried to compile wget, I just changed the
reference to `h_errno' from:
extern int h_errno;
to
/* extern */ int h_errno;
in one place (ftp.c) and wget compiled fine. Having just read
http://www.cygwin.com/ml/cygwin/2000-01/msg00452.html , I expect that was
not the most correct thing to do, but it did allow me to compile and use
wget. Perhaps you could do the same with apache.
It's a hack, but it might be just enough to allow you to get your simple
files-via-http service running.
--wpd
Josifovski Ljubomir-BLJ01Z wrote:
>
> I'm trying to compile apache from
>
> http://www.student.uni-koeln.de/cygwin/Distribution/Source/apache/
>
> and I get an error:
>
> ===> src/support
> make[2]: Entering directory `/home/sysop/apache_1.3.9-cygwin/src/support'
> gcc -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite `../apaci` logresolve.o
> -o logresolve -L../os/cygwin -L../ap -lap -los -lcrypt -lcrypt
> logresolve.o(.text+0x13a):logresolve.c: undefined reference to `h_errno'
> logresolve.o(.text+0x14d):logresolve.c: undefined reference to `h_errno'
> logresolve.o(.text+0x167):logresolve.c: undefined reference to `h_errno'
> collect2: ld returned 1 exit status
> make[2]: *** [logresolve] Error 1
> make[2]: Leaving directory `/home/sysop/apache_1.3.9-cygwin/src/support'
> <=== src/support
> make[1]: Leaving directory `/home/sysop/apache_1.3.9-cygwin'
> <=== src
>
> I found a message ragarding compiling wget and link error involving h_errno
> at
>
> http://www.cygwin.com/ml/cygwin/2000-01/msg00452.html
>
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* Q: apache: logresolve.c: undefined reference to `h_errno'
@ 2000-12-14 6:47 Josifovski Ljubomir-BLJ01Z
2000-12-14 7:09 ` Patrick Doyle
0 siblings, 1 reply; 4+ messages in thread
From: Josifovski Ljubomir-BLJ01Z @ 2000-12-14 6:47 UTC (permalink / raw)
To: 'cygwin@sourceware.cygnus.com'
I'm trying to compile apache from
http://www.student.uni-koeln.de/cygwin/Distribution/Source/apache/
and I get an error:
===> src/support
make[2]: Entering directory `/home/sysop/apache_1.3.9-cygwin/src/support'
gcc -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite `../apaci` logresolve.o
-o logresolve -L../os/cygwin -L../ap -lap -los -lcrypt -lcrypt
logresolve.o(.text+0x13a):logresolve.c: undefined reference to `h_errno'
logresolve.o(.text+0x14d):logresolve.c: undefined reference to `h_errno'
logresolve.o(.text+0x167):logresolve.c: undefined reference to `h_errno'
collect2: ld returned 1 exit status
make[2]: *** [logresolve] Error 1
make[2]: Leaving directory `/home/sysop/apache_1.3.9-cygwin/src/support'
<=== src/support
make[1]: Leaving directory `/home/sysop/apache_1.3.9-cygwin'
<=== src
I found a message ragarding compiling wget and link error involving h_errno
at
http://www.cygwin.com/ml/cygwin/2000-01/msg00452.html
Mine libcygwin.a has:
sysop@ZUK02-0544 ~/apache_1.3.9-cygwin
$ nm /usr/lib/libcygwin.a |grep h_errno
00000000 I __imp__h_errno
and the lines in netdb.h are
#ifdef __INSIDE_CYGWIN_NET__
extern int h_errno;
#else
extern __declspec(dllimport) int h_errno;
#endif
I see that
sysop@ZUK02-0544 ~/apache_1.3.9-cygwin
$ nm src/support/logresolve.o | grep h_errno
U _h_errno
and
$ nm /usr/lib/libcygwin.a | grep h_errno
00000000 I __imp__h_errno
Or better, does anyone know of a simple and easy httpd (I don't need
anything but simple files-via-http service - no cgi or php or anything
else)?
thanks in advance,
Ljubomir
--
Ljubomir Josifovski
mailto:L.Josifovski@dcs.shef.ac.uk,blj01z@email.mot.com
http://www.dcs.shef.ac.uk/~ljupco
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2000-12-16 8:23 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-15 5:23 Q: apache: logresolve.c: undefined reference to `h_errno' Josifovski Ljubomir-BLJ01Z
-- strict thread matches above, loose matches on Subject: below --
2000-12-14 6:47 Josifovski Ljubomir-BLJ01Z
2000-12-14 7:09 ` Patrick Doyle
2000-12-16 8:23 ` Charles S. Wilson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).