satng / curlpp

Automatically exported from code.google.com/p/curlpp
0 stars 0 forks source link

Compile issue on MingW #16

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. ./configure --with-boost=/c/Tools/boost --disable-shared
--disable-ewarning -prefix=/mingw

Produces the following:
checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether ln -s works... yes
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 how to run the C++ preprocessor... g++ -E
checking for a sed that does not truncate output... /bin/sed
checking for Boost headers version >= 0... /c/Tools/boost/include/boost-1_40
checking for Boost's header version... 1_40
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... yes
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 xlf... no
checking for f77... 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 xlf90... no
checking for f90... no
checking for pgf90... no
checking for pghpf... no
checking for epcf90... no
checking for gfortran... no
checking for g95... no
checking for xlf95... no
checking for f95... no
checking for fort... 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 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... no
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) yes
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... 7.19.6
checking enable gcc warnings... yes
checking warning make an error on compilation... no
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... yes
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 examples/Makefile
config.status: creating src/Makefile
config.status: creating src/curlpp/Makefile
config.status: creating src/curlpp/internal/Makefile
config.status: creating src/utilspp/Makefile
config.status: creating include/Makefile
config.status: creating include/curlpp/Makefile
config.status: creating include/curlpp/internal/Makefile
config.status: creating include/utilspp/Makefile
config.status: creating include/utilspp/functor/Makefile
config.status: creating include/utilspp/singleton/Makefile
config.status: creating doc/Makefile
config.status: creating include/curlpp/config.h
config.status: include/curlpp/config.h is unchanged
config.status: executing depfiles commands

2. make - see a lot of warnings like warning:
'curlpp::internal::SList::SList(const curlpp::internal::SList&)' redeclared
without dllimport attribute: previous dllimport ignored in attached file2.txt 

What is the expected output? What do you see instead?

compilation, but instead see linker errors
What version of the product are you using? On what operating system?

Please provide any additional information below.

Original issue reported on code.google.com by dwmcqu...@gmail.com on 22 Oct 2009 at 2:33

Attachments:

GoogleCodeExporter commented 9 years ago
I am getting linker issue in code::blocks

obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x11f)||undefined reference to 
`__imp___ZN6cURLpp7CleanupC1Ev'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x131)||undefined reference to 
`__imp___ZN6cURLpp4EasyC1Ev'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x1bd)||undefined reference to 
`cURLpp::Easy::setOpt(cURLpp::OptionBase*)'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x1f3)||undefined reference to 
`operator<<(std::ostream&, cURLpp::Easy const&)'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x263)||undefined reference to 
`operator<<(std::ostream&, cURLpp::OptionTrait<std::string, (CURLoption)10002> 
const&)'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x2bd)||undefined reference to 
`cURLpp::Easy::~Easy()'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x2cd)||undefined reference to 
`__imp___ZN6cURLpp7CleanupD1Ev'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x43f)||undefined reference to 
`cURLpp::Easy::~Easy()'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text+0x44c)||undefined reference to 
`__imp___ZN6cURLpp7CleanupD1Ev'|
]+0x10)||undefined reference to 
`cURLpp::OptionBase::operator<(cURLpp::OptionBase 
const&) const'|
]+0x10)||undefined reference to 
`cURLpp::OptionBase::operator<(cURLpp::OptionBase 
const&) const'|
::~Option()]+0x7d)||undefined reference to `__imp___ZN6cURLpp10OptionBaseD2Ev'|
::~Option()]+0xf4)||undefined reference to `__imp___ZN6cURLpp10OptionBaseD2Ev'|
::~Option()]+0x7d)||undefined reference to `__imp___ZN6cURLpp10OptionBaseD2Ev'|
::~Option()]+0xe9)||undefined reference to `__imp___ZN6cURLpp10OptionBaseD2Ev'|
::~Option()]+0x7d)||undefined reference to `__imp___ZN6cURLpp10OptionBaseD2Ev'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text$_ZN6cURLpp11UnsetOptionD1Ev[cURL
pp::U
nsetOption::~UnsetOption()]+0x14)||undefined reference to 
`__imp___ZN6cURLpp12RuntimeErrorD2Ev'|
obj\Release\downloads\curlpp\curlpp-
0.7.2\examples\example22.o:example22.cpp:(.text$_ZN6cURLpp11UnsetOptionD0Ev[cURL
pp::U
nsetOption::~UnsetOption()]+0x15)||undefined reference to 
`__imp___ZN6cURLpp12RuntimeErrorD2Ev'|
::getValue() const]+0x84)||undefined reference to 
`__imp___ZN6cURLpp11UnsetOptionC1ERKSs'|
)]+0x53)||undefined reference to `__imp___ZN6cURLpp10OptionBaseC2E10CURLoption'|
)]+0xb7)||undefined reference to `__imp___ZN6cURLpp10OptionBaseD2Ev'|
)]+0x128)||undefined reference to `__imp___ZN6cURLpp11UnsetOptionC1EPKc'|
)]+0x2f)||undefined reference to 
`__imp___ZN6cURLpp20libcurlRuntimeAssertEPKc8CURLcode'|
) const]+0x84)||undefined reference to `__imp___ZN6cURLpp11UnsetOptionC1ERKSs'|
||=== Build finished: 24 errors, 0 warnings ===|

Original comment by cinud...@gmail.com on 22 Oct 2009 at 5:51

GoogleCodeExporter commented 9 years ago
My compile was using MinGW with GCC 4.4.1 from here - 
http://www.tdragon.net/recentgcc/

Original comment by dwmcqu...@gmail.com on 22 Oct 2009 at 2:25

GoogleCodeExporter commented 9 years ago
I think it is a related error - some of the function declarations are being 
ignored
due to the dllimport issue - do you have your CodeBlocks project file?

Original comment by dwmcqu...@gmail.com on 22 Oct 2009 at 2:28