This line here: c:\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: cannot find -lz
means that you don't have the library called "z" in a place where the linker can find. The library is called zlib, and you should be able to find it either in the dependencies of curl/curlpp or somewhere else. -Gazi On 14/08/07, Joel Stephens <[EMAIL PROTECTED]> wrote: > Ive been working on this for a few days and I still dont have a working > curlpp. > here are the commands im using to build curlpp in msys. > > cd /g/programming/libs/curlpp-0.7.0 > export PATH="$PATH:/g/programming/libs/libcurl- 7.16.4/bin" > export > CPPFLAGS="-I/g/programming/libs/libcurl-7.16.4/include" > export LDFLAGS="-L/g/programming/libs/libcurl-7.16.4/lib" > ./configure > make > > configure seems to work ok. > make seems to have a few errors and quits. > > here is the out put from configure and make. > > > $ ./configure > checking for a BSD-compatible install... /bin/install -c > checking whether build environment is sane... yes > checking for gawk... gawk > checking whether make sets $(MAKE)... yes > checking whether ln -s works... no, using cp -p > checking whether make sets $(MAKE)... (cached) yes > checking for gcc... gcc > checking for C compiler default output file name... a.exe > checking whether the C compiler works... yes > checking whether we are cross compiling... no > checking for suffix of executables... .exe > checking for suffix of object files... o > checking whether we are using the GNU C compiler... yes > checking whether gcc accepts -g... yes > checking for gcc option to accept ISO C89... none needed > checking for style of include used by make... GNU > checking dependency style of gcc... gcc3 > checking how to run the C preprocessor... gcc -E > checking for g++... g++ > checking whether we are using the GNU C++ compiler... yes > checking whether g++ accepts -g... yes > checking dependency style of g++... gcc3 > checking for a BSD-compatible install... /bin/install -c > checking build system type... i686-pc-mingw32 > checking host system type... i686-pc-mingw32 > checking for a sed that does not truncate output... /bin/sed > checking for grep that handles long lines and -e... /bin/grep > checking for egrep... /bin/grep -E > checking for ld used by gcc... c:/mingw/mingw32/bin/ld.exe > checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes > checking for c:/mingw/mingw32/bin/ld.exe option to reload object files... -r > checking for BSD-compatible nm... /mingw/bin/nm > checking how to recognise dependent libraries... file_magic file format > pei*-i386(.*architecture: i386)? > checking for dlltool... dlltool > checking for as... as > checking for objdump... objdump > checking for ANSI C header files... no > checking for sys/types.h... yes > checking for sys/stat.h... yes > checking for stdlib.h... yes > checking for string.h... yes > checking for memory.h... yes > checking for strings.h... yes > checking for inttypes.h... yes > checking for stdint.h... yes > checking for unistd.h... yes > checking dlfcn.h usability... no > checking dlfcn.h presence... no > checking for dlfcn.h... no > checking how to run the C++ preprocessor... g++ -E > checking for g77... no > checking for f77... no > checking for xlf... no > checking for frt... no > checking for pgf77... no > checking for cf77... no > checking for fort77... no > checking for fl32... no > checking for af77... no > checking for f90... no > checking for xlf90... no > checking for pgf90... no > checking for pghpf... no > checking for epcf90... no > checking for gfortran... no > checking for g95... no > checking for f95... no > checking for fort... no > checking for xlf95... no > checking for ifort... no > checking for ifc... no > checking for efc... no > checking for pgf95... no > checking for lf95... no > checking for ftn... no > checking whether we are using the GNU Fortran 77 compiler... no > checking whether accepts -g... no > checking the maximum length of command line arguments... 8192 > checking command to parse /mingw/bin/nm output from gcc object... ok > checking for objdir... .libs > checking for ar... ar > checking for ranlib... ranlib > checking for strip... strip > checking if gcc supports -fno-rtti -fno-exceptions... no > checking for gcc option to produce PIC... -DDLL_EXPORT > checking if gcc PIC flag -DDLL_EXPORT works... yes > checking if gcc static flag -static works... yes > checking if gcc supports -c -o file.o... yes > checking whether the gcc linker (c:/mingw/mingw32/bin/ld.exe) supports > shared libraries... yes > checking whether -lc should be explicitly linked in... yes > checking dynamic linker characteristics... Win32 ld.exe > checking how to hardcode library paths into programs... immediate > checking whether stripping libraries is possible... yes > checking if libtool supports shared libraries... yes > checking whether to build shared libraries... yes > checking whether to build static libraries... yes > configure: creating libtool > appending configuration tag "CXX" to libtool > checking for ld used by g++... c:/mingw/mingw32/bin/ld.exe > checking if the linker (c:/mingw/mingw32/bin/ld.exe) is GNU ld... yes > checking whether the g++ linker (c:/mingw/mingw32/bin/ld.exe) supports > shared libraries... yes > checking for g++ option to produce PIC... -DDLL_EXPORT > checking if g++ PIC flag -DDLL_EXPORT works... yes > checking if g++ static flag -static works... yes > checking if g++ supports -c -o file.o... yes > checking whether the g++ linker (c:/mingw/mingw32/bin/ld.exe) supports > shared libraries... yes > checking dynamic linker characteristics... Win32 ld.exe > checking how to hardcode library paths into programs... immediate > appending configuration tag "F77" to libtool > checking for ANSI C header files... (cached) no > checking curl/curl.h usability... yes > checking curl/curl.h presence... yes > checking for curl/curl.h... yes > checking ostream usability... yes > checking ostream presence... yes > checking for ostream... yes > checking for curl >= 7.10.0... ./configure: bc: command not found > 7.16.4 > checking enable gcc warnings... yes > checking warning make an error on compilation... yes > checking whether to enable the maintener code... no > checking whether to enable Debug symbols support options... no > checking if we need BUILDING_CURLPP... yes > checking if we need CURLPP_STATICLIB... no > configure: creating ./config.status > config.status: creating curlpp-config > config.status: creating curlpp.spec > config.status: creating curlpp.pc > config.status: creating Makefile > config.status: creating curlpp/Makefile > config.status: creating examples/Makefile > config.status: creating utilspp/Makefile > config.status: creating utilspp/functor/Makefile > config.status: creating utilspp/singleton/Makefile > config.status: creating doc/Makefile > config.status: creating config.h > config.status: executing depfiles commands > > > > > > > > > $ make > make all-recursive > make[1]: Entering directory `/g/programming/libs/curlpp-0.7.0' > Making all in utilspp > make[2]: Entering directory `/g/programming/libs/curlpp-0.7.0 /utilspp' > Making all in functor > make[3]: Entering directory > `/g/programming/libs/curlpp-0.7.0/utilspp/functor' > make[3]: Nothing to be done for `all'. > make[3]: Leaving directory `/g/programming/libs/curlpp- > 0.7.0/utilspp/functor' > Making all in singleton > make[3]: Entering directory > `/g/programming/libs/curlpp-0.7.0/utilspp/singleton' > if /bin/sh ../../libtool --silent --tag=CXX --mode=compile g++ > -DHAVE_CONFIG_H -I. -I. -I../.. -I/g/programming/libs/libcurl- > 7.16.4/include -g -W -Wall -Werror -I/usr/local/include -MT > LifetimeLibrary.lo -MD -MP -MF ".deps/LifetimeLibrary.Tpo" -c -o > LifetimeLibrary.lo LifetimeLibrary.cpp; \ > then mv -f ".deps/LifetimeLibrary.Tpo" ".deps/LifetimeLibrary.Plo"; else rm > -f ".deps/LifetimeLibrary.Tpo"; exit 1; fi > if /bin/sh ../../libtool --silent --tag=CXX --mode=compile g++ > -DHAVE_CONFIG_H -I. -I. -I../.. > -I/g/programming/libs/libcurl-7.16.4/include -g -W -Wall -Werror > -I/usr/local/include -MT PrivateMembers.lo -MD -MP -MF > ".deps/PrivateMembers.Tpo" -c -o PrivateMembers.lo PrivateMembers.cpp; \ > then mv -f ".deps/PrivateMembers.Tpo" ".deps/PrivateMembers.Plo"; else rm -f > ".deps/PrivateMembers.Tpo"; exit 1; fi > /bin/sh ../../libtool --silent --tag=CXX --mode=link g++ -g -W -Wall > -Werror -I/usr/local/include -L/g/programming/libs/libcurl- 7.16.4/lib -o > libsingleton.la LifetimeLibrary.lo PrivateMembers.lo -lstdc++ > -L/usr/local/lib -lcurl -L/home/dast/src/win32 -lwinmm -lws2_32 -lz -lws2_32 > libtool: link: warning: library `/g/programming/libs/libcurl- > 7.16.4/lib/libcurl.la' was moved. > make[3]: Leaving directory > `/g/programming/libs/curlpp-0.7.0/utilspp/singleton' > make[3]: Entering directory `/g/programming/libs/curlpp-0.7.0/utilspp' > /bin/sh ../libtool --silent --tag=CC --mode=link gcc -g -O2 > -L/g/programming/libs/libcurl- 7.16.4/lib -o libutilspp.la > ./singleton/libsingleton.la -lstdc++ -L/usr/local/lib -lcurl > -L/home/dast/src/win32 -lwinmm -lws2_32 -lz -lws2_32 > > *** Warning: This system can not link to static lib archive > /mingw/lib//libstdc++.la. > *** I have the capability to make that library automatically link in when > *** you link to this library. But I can only do this if you have a > *** shared version of the library, which you do not appear to have. > libtool: link: warning: library > `/g/programming/libs/libcurl-7.16.4/lib/libcurl.la' was moved. > make[3]: Leaving directory `/g/programming/libs/curlpp-0.7.0/utilspp' > make[2]: Leaving directory `/g/programming/libs/curlpp- 0.7.0/utilspp' > Making all in curlpp > make[2]: Entering directory `/g/programming/libs/curlpp-0.7.0/curlpp' > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl- 7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT CurlHandle.lo -MD -MP -MF > ".deps/CurlHandle.Tpo" -c -o CurlHandle.lo CurlHandle.cpp; \ > then mv -f ".deps/CurlHandle.Tpo" ".deps/CurlHandle.Plo"; else rm -f > ".deps/CurlHandle.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl-7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT cURLpp.lo -MD -MP -MF > ".deps/cURLpp.Tpo" -c -o cURLpp.lo cURLpp.cpp; \ > then mv -f ".deps/cURLpp.Tpo" ".deps/cURLpp.Plo"; else rm -f > ".deps/cURLpp.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl- 7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT Exception.lo -MD -MP -MF > ".deps/Exception.Tpo" -c -o Exception.lo Exception.cpp; \ > then mv -f ".deps/Exception.Tpo" ".deps/Exception.Plo"; else rm -f > ".deps/Exception.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl-7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT Easy.lo -MD -MP -MF > ".deps/Easy.Tpo" -c -o Easy.lo Easy.cpp; \ > then mv -f ".deps/Easy.Tpo" ".deps/Easy.Plo"; else rm -f ".deps/Easy.Tpo"; > exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl- 7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT Form.lo -MD -MP -MF > ".deps/Form.Tpo" -c -o Form.lo Form.cpp; \ > then mv -f ".deps/Form.Tpo" ".deps/Form.Plo"; else rm -f ".deps/Form.Tpo"; > exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl-7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT Info.lo -MD -MP -MF > ".deps/Info.Tpo" -c -o Info.lo Info.cpp; \ > then mv -f ".deps/Info.Tpo" ".deps/Info.Plo"; else rm -f ".deps/Info.Tpo"; > exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl- 7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT Multi.lo -MD -MP -MF > ".deps/Multi.Tpo" -c -o Multi.lo Multi.cpp; \ > then mv -f ".deps/Multi.Tpo" ".deps/Multi.Plo"; else rm -f > ".deps/Multi.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl-7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT OptionBase.lo -MD -MP -MF > ".deps/OptionBase.Tpo" -c -o OptionBase.lo OptionBase.cpp; \ > then mv -f ".deps/OptionBase.Tpo" ".deps/OptionBase.Plo"; else rm -f > ".deps/OptionBase.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl- 7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT OptionList.lo -MD -MP -MF > ".deps/OptionList.Tpo" -c -o OptionList.lo OptionList.cpp; \ > then mv -f ".deps/OptionList.Tpo" ".deps/OptionList.Plo"; else rm -f > ".deps/OptionList.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl-7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT OptionSetter.lo -MD -MP -MF > ".deps/OptionSetter.Tpo" -c -o OptionSetter.lo OptionSetter.cpp; \ > then mv -f ".deps/OptionSetter.Tpo" ".deps/OptionSetter.Plo"; else rm -f > ".deps/OptionSetter.Tpo"; exit 1; fi > if /bin/sh ../libtool --silent --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H > -I. -I. -I.. -I/g/programming/libs/libcurl- 7.16.4/include -I../ -g -W > -Wall -Werror -I/usr/local/include -MT SList.lo -MD -MP -MF > ".deps/SList.Tpo" -c -o SList.lo SList.cpp; \ > then mv -f ".deps/SList.Tpo" ".deps/SList.Plo"; else rm -f > ".deps/SList.Tpo"; exit 1; fi > /bin/sh ../libtool --silent --tag=CXX --mode=link g++ -I../ -g -W -Wall > -Werror -I/usr/local/include -L/g/programming/libs/libcurl-7.16.4/lib -o > libcurlpp.la -rpath /usr/local/lib -no-undefined -Wno-inline-dllimport > -version-info 0:2:0 CurlHandle.lo cURLpp.lo Exception.lo Easy.lo Form.lo > Info.lo Multi.lo OptionBase.lo OptionList.lo OptionSetter.lo SList.lo > -lstdc++ -L/usr/local/lib -lcurl -L/home/dast/src/win32 -lwinmm -lws2_32 -lz > -lws2_32 > libtool: link: warning: library `/g/programming/libs/libcurl- > 7.16.4/lib/libcurl.la' was moved. > > *** Warning: linker path does not have real file for library -lz. > *** I have the capability to make that library automatically link in when > *** you link to this library. But I can only do this if you have a > *** shared version of the library, which you do not appear to have > *** because I did check the linker path looking for a file starting > *** with libz and none of the candidates passed a file format test > *** using a file magic. Last file checked: > c:/mingw/bin/../lib/gcc/mingw32/3.4.2/../../../libwinmm.a > *** The inter-library dependencies that have been dropped here will be > *** automatically added whenever a program is linked with this library > *** or is declared to -dlopen it. > > *** Since this library must not contain undefined symbols, > *** because either the platform does not support them or > *** it was explicitly requested with -no-undefined, > *** libtool will only create a static version of it. > make[2]: Leaving directory `/g/programming/libs/curlpp- 0.7.0/curlpp' > Making all in examples > make[2]: Entering directory `/g/programming/libs/curlpp-0.7.0/examples' > if g++ -DHAVE_CONFIG_H -I. -I. -I.. > -I/g/programming/libs/libcurl-7.16.4/include -I../ -g -W -Wall -Werror > -I/usr/local/include -MT example01.o -MD -MP -MF ".deps/example01.Tpo" -c -o > example01.o example01.cpp; \ > then mv -f ".deps/example01.Tpo" ".deps/example01.Po"; else rm -f > ".deps/example01.Tpo"; exit 1; fi > /bin/sh ../libtool --silent --tag=CXX --mode=link g++ -I../ -g -W -Wall > -Werror -I/usr/local/include -L../curlpp/ -lcurlpp -static > -L/g/programming/libs/libcurl-7.16.4/lib -o example01.exe example01.o > -lstdc++ -L/usr/local/lib -lcurl -L/home/dast/src/win32 -lwinmm -lws2_32 -lz > -lws2_32 > libtool: link: warning: library > `/g/programming/libs/libcurl-7.16.4/lib/libcurl.la' was moved. > libtool: link: warning: library > `/g/programming/libs/libcurl-7.16.4/lib/libcurl.la' was moved. > c:\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: > cannot find -lz > collect2: ld returned 1 exit status > make[2]: *** [example01.exe] Error 1 > make[2]: Leaving directory `/g/programming/libs/curlpp-0.7.0/examples' > make[1]: *** [all-recursive] Error 1 > make[1]: Leaving directory `/g/programming/libs/curlpp- 0.7.0' > make: *** [all] Error 2 > > > > > > > On 8/11/07, Armel Asselin <[EMAIL PROTECTED] > wrote: > > > > > > > > > > thanks armel, > > I still have the same error, but I dont have the .lib files. I only have > the .a files. > > do i have to compile libcurl from source too? > > generally, unix oriented compilers (such as gcc) build .a files for static > libraries, and .so for dynamic (or .dylib on Mac OS X) so it seems OK. be > sure to have -L be the directory containing the libraries. here i build > libcurl with a few modification so what I explain is for libcurl built from > source. else -L should point to the place where libcurl is installed on your > system. > > > > On 8/11/07, Armel Asselin <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > > > I have been trying to compile curlpp with little success. I am using > mingw and msys. > > > Here are the commands I have been using: > > > > > > export > PATH="$PATH:/g/programming/libs/libcurl-7.16.4/bin" > > > export CPPFLAGS="-I/g/programming/libs/libcurl- > 7.16.4/include" > > > ./configure > > > make > > > > > > I eventually run into this error: > > > > > > > c:\mingw\bin\..\lib\gcc\mingw32\3.4.2\..\..\..\..\mingw32\bin\ld.exe: > cannot find -lcurl > > > you probably need some -L option in your LDFLAGS, such as > LDFLAGS="-Lg/programming/libs/libcurl- 7.16.4/lib/.libs" > > > > > > Apparently mingw cant find the libcurl library. How do I tell libcurl > where this file is? > > > Or is there something else I am doing wrong? > > > > > > > > > Armel > > > > > > > > > > > > > > > _______________________________________________ > > > cURLpp mailing list > > > [email protected] > > > > http://www.rrette.com/mailman/listinfo/curlpp > > > > > > > > > > > > > > ________________________________ > > > > > _______________________________________________ > > cURLpp mailing list > > [email protected] > > > http://www.rrette.com/mailman/listinfo/curlpp > > > > > > > > _______________________________________________ > > cURLpp mailing list > > [email protected] > > > http://www.rrette.com/mailman/listinfo/curlpp > > > > > > > _______________________________________________ > cURLpp mailing list > [email protected] > http://www.rrette.com/mailman/listinfo/curlpp > > _______________________________________________ cURLpp mailing list [email protected] http://www.rrette.com/mailman/listinfo/curlpp
