Author Topic: Strange linking issues  (Read 7120 times)

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Strange linking issues
« on: November 01, 2009, 03:26:46 am »
I am trying to compile curlpp (http://www.curlpp.org) using the latest nightly build.  I get the following error:

Code
-------------- Clean: Release Static in curlpp ---------------

Cleaned "curlpp - Release Static"

-------------- Build: Release Static in curlpp ---------------

Compiling: include\curlpp\Easy.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\curlpp\Easy.inl: linker input file unused because linking not done
Compiling: include\curlpp\Info.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\curlpp\Info.inl: linker input file unused because linking not done
Compiling: include\curlpp\Option.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\curlpp\Option.inl: linker input file unused because linking not done
Compiling: include\curlpp\internal\CurlHandle.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\curlpp\internal\CurlHandle.inl: linker input file unused because linking not done
Compiling: include\curlpp\internal\OptionContainer.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\curlpp\internal\OptionContainer.inl: linker input file unused because linking not done
Compiling: include\curlpp\internal\OptionSetter.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\curlpp\internal\OptionSetter.inl: linker input file unused because linking not done
Compiling: include\utilspp\ThreadingFactoryMutex.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\ThreadingFactoryMutex.inl: linker input file unused because linking not done
Compiling: include\utilspp\ThreadingSingle.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\ThreadingSingle.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\CreationStatic.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\CreationStatic.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\CreationUsingNew.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\CreationUsingNew.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\LifetimeDefault.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\LifetimeDefault.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\LifetimeLibrary.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\LifetimeLibrary.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\LifetimeWithLongevity.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\LifetimeWithLongevity.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\PrivateMembers.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\PrivateMembers.inl: linker input file unused because linking not done
Compiling: include\utilspp\singleton\SingletonHolder.inl
mingw32-g++.exe: C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\include\utilspp\singleton\SingletonHolder.inl: linker input file unused because linking not done
Compiling: src\curlpp\Easy.cpp
In file included from include/curlpp/internal/../internal/global.h:28,
                 from include/curlpp/internal/../Types.hpp:28,
                 from include/curlpp/internal/CurlHandle.hpp:31,
                 from include/curlpp/Easy.hpp:29,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\Easy.cpp:24:
include/curlpp/config.win32.h:64:1: warning: "STDC_HEADERS" redefined
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/string:40,
                 from include/curlpp/internal/../Exception.hpp:32,
                 from include/curlpp/internal/CurlHandle.hpp:30,
                 from include/curlpp/Easy.hpp:29,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\Easy.cpp:24:
c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/mingw32/bits/c++config.h:978:1: warning: this is the location of the previous definition
Compiling: src\curlpp\Exception.cpp
Compiling: src\curlpp\Form.cpp
Compiling: src\curlpp\Info.cpp
Compiling: src\curlpp\Infos.cpp
Compiling: src\curlpp\Multi.cpp
Compiling: src\curlpp\Option.cpp
In file included from include/curlpp/internal/../internal/global.h:28,
                 from include/curlpp/internal/../Types.hpp:28,
                 from include/curlpp/internal/OptionContainerType.hpp:31,
                 from include/curlpp/internal/OptionContainer.hpp:29,
                 from include/curlpp/Option.hpp:29,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\Option.cpp:1:
include/curlpp/config.win32.h:64:1: warning: "STDC_HEADERS" redefined
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/bits/stl_algobase.h:60,
                 from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/list:61,
                 from include/curlpp/internal/SList.hpp:32,
                 from include/curlpp/internal/OptionContainerType.hpp:28,
                 from include/curlpp/internal/OptionContainer.hpp:29,
                 from include/curlpp/Option.hpp:29,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\Option.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/mingw32/bits/c++config.h:978:1: warning: this is the location of the previous definition
Compiling: src\curlpp\OptionBase.cpp
Compiling: src\curlpp\Options.cpp
Compiling: src\curlpp\cURLpp.cpp
In file included from include/curlpp/internal/global.h:28,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\cURLpp.cpp:4:
include/curlpp/config.win32.h:64:1: warning: "STDC_HEADERS" redefined
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/exception:37,
                 from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/stdexcept:38,
                 from include/utilspp/singleton/LifetimeDefault.hpp:27,
                 from include/utilspp/singleton/SingletonHolder.hpp:30,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\cURLpp.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/mingw32/bits/c++config.h:978:1: warning: this is the location of the previous definition
Compiling: src\curlpp\internal\CurlHandle.cpp
Compiling: src\curlpp\internal\OptionList.cpp
Compiling: src\curlpp\internal\OptionSetter.cpp
Compiling: src\curlpp\internal\SList.cpp
In file included from include/curlpp/internal/global.h:28,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\internal\SList.cpp:2:
include/curlpp/config.win32.h:64:1: warning: "STDC_HEADERS" redefined
In file included from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/bits/stl_algobase.h:60,
                 from c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/list:61,
                 from include/curlpp/internal/SList.hpp:32,
                 from C:\Tools\curlpp_console_static.delivery.v1.rar\3rdparty\curlpp\src\curlpp\internal\SList.cpp:1:
c:\mingw\bin\../lib/gcc/mingw32/4.4.1/include/c++/mingw32/bits/c++config.h:978:1: warning: this is the location of the previous definition
Compiling: src\utilspp\singleton\LifetimeLibrary.cpp
Compiling: src\utilspp\singleton\PrivateMembers.cpp
Linking static library: release-static\libcurlPP.a
ar.exe: creating release-static\libcurlPP.a
ar.exe: release-static\obj\include\curlpp\Easy.o: No such file or directory
Process terminated with status 1 (0 minutes, 10 seconds)
0 errors, 8 warnings
 

Not really an error, but notice the last line about linking Easy.o.  Easy.o is in a different directory (see in the build log as to where it is compiled).  I do notice there is a warning about STDC_HEADERS.  I also notice the resulting library is only 1k and not complete.

This same project compiled fine in 8.02.  Any thing I am missing?

Online stahta01

  • Lives here!
  • ****
  • Posts: 7132
    • My Best Post
Re: Strange linking issues
« Reply #1 on: November 01, 2009, 03:43:22 am »
Did you change the Compiler/version?

Edit: I do NOT see where it supports building with MinGW GCC!

If you wish to use MinGW GCC; i suggest changing file "include/curlpp/config.win32.h"
so STDC_HEADERS is set to 1
Code
#define STDC_HEADERS 1

Tim S.
« Last Edit: November 01, 2009, 03:53:56 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline dwmcqueen

  • Multiple posting newcomer
  • *
  • Posts: 56
Re: Strange linking issues
« Reply #2 on: November 01, 2009, 09:33:40 pm »
Still get the same warning at the end:

Linking static library: release-static\libcurlPP.a
ar.exe: release-static\obj\include\curlpp\Easy.o: No such file or directory

Not sure why it wants to link Easy.o in the include directory instead of the source directory where it was compiled.

The static library still looks too small.