Boost logo

Boost :

Subject: [boost] Failing to build Boost.Test library using Clang 3.1 on Netbeans
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2012-11-16 11:29:53


Target: i686-w64-mingw32 Thread model: posix)
 
(This is Ruben's mingw64 build)
 
on Netbeans 7.2 on Windows 7.
 
The compilation stage goes OK
 
(but with many warnings
 
In file included from i:/boost-trunk/libs/test/src/test_tools.cpp:16:
In file included from i:/boost-trunk\boost/test/impl/test_tools.ipp:23:
i:/boost-trunk\boost/test/tree/test_unit.hpp:164:7: warning: 'dllexport' attribute only applies to
variables and functions
class BOOST_TEST_DECL master_test_suite_t : public test_suite {
      ^
i:/boost-trunk\boost/test/detail/config.hpp:106:29: note: expanded from macro 'BOOST_TEST_DECL'
# define BOOST_TEST_DECL BOOST_SYMBOL_EXPORT
                            ^
i:/boost-trunk\boost/config/platform/win32.hpp:30:42: note: expanded from macro
'BOOST_SYMBOL_EXPORT'
# define BOOST_SYMBOL_EXPORT __declspec(dllexport)
                                         ^
<built-in>:150:38: note: expanded from macro '__declspec'
#define __declspec(a) __attribute__((a))
 
but the link stage to build the library fails with many
 
Cannot export boost::test_tools::tt_detail::check_impl(boost::test_tools::predicate_result const&,
boost::unit_test::lazy_ostream const&, boost::unit_test::basic_cstring<char const>, unsigned int,
boost::test_tools::tt_detail::tool_level, boost::test_tools::tt_detail::check_type, unsigned int,
...): symbol not found
 
(full output window message attached).
 
I have also failed to build using bjam (missing <cstddef> so missing the right stdlib?) and I wonder
if both these are connected with lack of a suitable boost/config.hpp which caters for Clang *on this
configuration*.
 
Where would/should __clang__ be defined in order to select this compiler?
 
My user-config.jam contains (in an attempt to cure )
 
# Clang compiler using mingw32 dw2 Ruben's release.
using clang
  : 3.1
  : "C:/mingw32-dw2/bin/clang++.exe"
  : <cxxflags>-v
    <cxxflags>-std="c++11"
    <cflags>-nostdinc # Do not include MSVC C headers.
    #<cflag>-c-include-dirs=???
    <cxxflags>-nostdinc++ # Do not include MSVC C++ headers.
    # Use mingw-dw2 for includes
    <cxxflags>-cxx-include-arch="C:/mingw32-dw2/i686-w64-mingw32"
    <cxxflags>-cxx-include-32bit-dir=32
    <cxxflags>-cxx-include-root="C:/mingw32-dw2/include/c++/4.6.3"
    <cxxflags>-stdlib=libc++
    #<compileflags>-std=gnu++11
    #<define>BOOST_STDLIB_CONFIG="i:/boost-trunk/boost/config/stdlib/libstdcpp3.hpp"
    <linkflags>-stdlib=libc++
  ;
 
Any views on my woes?
 
Paul
 
 
 

---
Paul A. Bristow,
Prizet Farmhouse, Kendal LA8 8AB  UK
+44 1539 561830  07714330204
pbristow_at_[hidden]
 



Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk