cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: libcurl (perl) and windows

From: lupusdacicus <lupusdacicus_at_juno.com>
Date: Tue, 5 Nov 2002 00:09:30 -0800

> There are a very large number of include files that will be requested by
> almost any piece of C code, including those in the perl directory and
those
> 'standard' headers that should be provided by your system (or compiler).
>
> Rather than copying them all over to the Curl::easy directory, you should
be
> able to tell your compiler where to find them all itself.

I know, I just don't know how. I mean, the PDF file that says about Visual
Studio helped a lot with compiling the files, but now I seem to be having
linking problems...

[...]
> > easy.obj : error LNK2001: unresolved external symbol _Perl_newXS
> > LIBCD.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> > Debug/easy.exe : fatal error LNK1120: 62 unresolved externals
> > Error executing link.exe.
>
> When compiling, your compiler can't find the headers, and this is fixed by
> telling it where to look with -I .

I am not having any luck with the (n)make utility that starts CL compiler
from dos. I was trying with the Visual C, because I can actually read the
error msg and try to do something about it.

> Now your are linking, and your linker
> can't find the appropriate libraries (perl.dll or whatever).

I think it should be libcurl.dll. I added it to the Project settings, like
the PDF file told me to. Or at least I think I did it the right way.

Jesus Christ, I am so f.ing stupid.... I went back to double check the
linker settings... and there was no libcurl.lib added there..... I am
positive I added there about two hours ago.... but there was nothing
there... I added once again and now the simple.c is executed and it does
just the same as the PDF file
(http://curl.haxx.se/libcurl/c/visual_studio.pdf) says. It does download
cnn.com or whatever...

Now, if I don't screw myself again (I am so good at doing that), I should be
able to run/build C scripts that use LIBCURL..... And hopefully I will
remember how to install the libcurl (c interface ) in the future too. I
should be puting that PDF file and these email messages on a CD... But since
I am such a lucky guy, the CD will probably break.... LOL ... so I better
memorise all of these... :-)

>You'll have to tell the linker where to look for libraries using the -L
option.

Thanks for the hint... I knew that it was something wrong with the linker,
because it said "linking errors", but I though I configured the linker
already, like that PDF file says... You should have that tutorial available
as a HTML file on your curl.haxx.se site, on the pages that talk about
installation of the C interface for Visual C. As I said, it helped me a
lot.... Thank you Rosso...

> Normally the -I and -L options are put into the Makefile by perl when you
run
> 'perl Makefile.PL', but the values you need are different from the ones
perl
> "knows", which are the ones used by Active State when they made perl.exe.
> You seem to need to change both the LIBS and INC options, either by
editting
> Makefile.PL, or using 'perl Makefile.PL LIBS=c:\blah\blah
INC=c:\blahblah'.
> I don't know where anything is on your machine, so I can't tell you what
> values you need to use though...

What should the LIBS path contain ? What about the INC path ?
My perl directory:
 Directory of C:\Perl

. <DIR> 10-22-02 11:37p .
.. <DIR> 10-22-02 11:37p ..
LIB <DIR> 10-22-02 11:37p lib
SITE <DIR> 10-22-02 11:37p site
EG <DIR> 10-22-02 11:37p eg
HTML <DIR> 10-22-02 11:37p html
BIN <DIR> 10-22-02 11:37p bin
POD2HTMI X~~ 15,548 10-22-02 11:38p pod2htmi.x~~
POD2HTMD X~~ 29,816 10-22-02 11:38p pod2htmd.x~~
DOCS <DIR> 10-25-02 2:27a Docs
VPM <DIR> 10-25-02 2:27a VPM
PDK <DIR> 10-25-02 2:27a PDK
PERL TXT 0 11-05-02 12:03a perl.txt
         3 file(s) 45,364 bytes
        10 dir(s) 34,671.25 MB free

and lib directory:
Directory of C:\Perl\lib

. <DIR> 10-22-02 11:37p .
.. <DIR> 10-22-02 11:37p ..
AUTO <DIR> 10-22-02 11:37p auto
UNICODE <DIR> 10-22-02 11:37p unicode
CPAN <DIR> 10-22-02 11:37p CPAN
DIRHAN~1 PM 1,425 09-04-01 3:24p DirHandle.pm
IO <DIR> 10-22-02 11:37p IO
FILE <DIR> 10-22-02 11:37p File
POD <DIR> 10-22-02 11:37p Pod
EXTUTILS <DIR> 10-22-02 11:37p ExtUtils
CORE <DIR> 10-22-02 11:37p CORE
FILETEST PM 2,159 09-04-01 3:24p filetest.pm
B <DIR> 10-22-02 11:37p B
CTIME PL 2,052 09-04-01 3:24p ctime.pl
TIE <DIR> 10-22-02 11:37p Tie
ASSERT PL 1,353 09-04-01 3:24p assert.pl
PERLLO~1 POD 8,314 10-22-02 11:38p perllocal.pod
AUTOLO~1 PM 11,013 06-17-02 1:11p AutoLoader.pm
ANYDBM~1 PM 2,662 09-04-01 3:23p AnyDBM_File.pm
FCNTL PM 5,457 06-17-02 1:03p Fcntl.pm
AUTOSP~1 PM 15,739 10-24-01 11:51a AutoSplit.pm
TERMCAP PL 4,292 09-04-01 3:24p termcap.pl
CPAN PM 224,846 09-04-01 3:24p CPAN.pm
MATH <DIR> 10-22-02 11:37p Math

[...]

At least now I have the C interface working (I think), if I am not gonna
mess it again. But I am still looking for a way to get the perl interface
working too... Any suggestions ? I hope that my email may be of use of some
other guys that may have problems trying to install perl/c interface onw
windows.

Thank you,
Nicusor.

-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
Received on 2002-11-06