Subject: Re: [Boost-bugs] [Boost C++ Libraries] #481: Linker Problems with VC .NET 2003 / STLPort / Boost
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2007-12-02 00:04:34
#481: Linker Problems with VC .NET 2003 / STLPort / Boost
-------------------------------+--------------------------------------------
Reporter: pluggy13 | Owner: grafik
Type: Support Requests | Status: closed
Milestone: | Component: Building Boost
Version: None | Severity: Problem
Resolution: wontfix | Keywords:
-------------------------------+--------------------------------------------
Changes (by grafik):
* status: assigned => closed
* resolution: None => wontfix
Old description:
> {{{
> Hi,
>
> I have been trying for over 2 days to install Boost in
> VC .NET 2003 alongside with STLPort , and despite
> several different settings, I am always getting the
> same linker errors.
>
> First I tried using STLPort 4.6.1 with boost 1.32.
> Here's a short, but complete description of what I have
> tried:
>
> First I downloaded and unzipped STLPort 4.61. Then I
> ran the vcvars batch and installed STLPort with
>
> nmake clean all -f vc71.mak
> nmake install -f vc71.mak
>
> Then I Installed boost 1.32 with
>
> bjam "-sTOOLS=vc-7_1-stlport"
> "-sSTLPORT_PATH=C:\...\stlport"
> "-sSTLPORT_VERSIONS=4.6.1" "-sstlport-iostreams=on" install
>
> This takes a while to complete, but seems to work fine
> except for a few errors with the datetime package,
> which I am not using anyway. I entered the boost /
> stlport header and lib directories into Visual studio
> and made sure they are on top of the other include
> directories.
>
> Then I created a dummy project with the following files:
>
> stdafx.h:
>
> --->>>>
> #ifdef NDEBUG
> # undef _STLP_DEBUG
> #else
> # define _STLP_DEBUG 1
> #endif
>
> #define BOOST_LIB_DIAGNOSTIC
>
> #include <iostream>
> #include <tchar.h>
> <<<---
>
> and the main.cpp:
>
> --->>>>
> #include "stdafx.h"
>
> #include <boost/filesystem/convenience.hpp>
>
> #include <vector>
> using namespace _STL;
>
> int _tmain(int argc, _TCHAR* argv)
> {
> //forcing native mode in boost paths just to make sure
> that boost::filesystem has to be linked successfully
> boost::filesystem::path::default_name_check(boost::filesystem::native);
> vector<int> test;
> test.push_back(1);
> vector<int>::iterator Iter=test.begin();
> Iter++;
> int testint=*Iter; // iterator overrun error just to
> see if the debug mode is working nicely
> return 0;
> }
> <<<---
>
> When I try to compile it, it fails with the following
> liker errors:
>
> --->>>>
> Compiling...
> stlport-boost-test.cpp
> Linking to lib file:
> libboost_filesystem-vc71-mt-sgdp-1_32.lib
> Linking...
> stlport-boost-test.obj : error LNK2019: unresolved
> external symbol "public: static void __cdecl
> boost::filesystem::path::default_name_check(bool
> (__cdecl*)(class _STL::basic_string<char,class
> _STL::char_traits<char>,class _STL::allocator<char> >
> const &))"
> (?default_name_check_at_path@filesystem_at_boost@@SAXP6A_NABV?$basic_string_at_DV?$char_traits_at_D@_STL@@V?$allocator_at_D@2@@_STL@@@Z_at_Z)
> referenced in function _main
> stlport-boost-test.obj : error LNK2019: unresolved
> external symbol "bool __cdecl
> boost::filesystem::native(class
> _STL::basic_string<char,class
> _STL::char_traits<char>,class _STL::allocator<char> >
> const &)"
> (?native_at_filesystem@boost@@YA_NABV?$basic_string_at_DV?$char_traits_at_D@_STL@@V?$allocator_at_D@2@@_STL@@@Z)
> referenced in function _main
> Debug/stlport-boost-test.exe : fatal error LNK1120: 2
> unresolved externals
>
> Build log was saved at "file://e:\documents and
> settings\Wunibald Wunderlich\My Documents\Visual Studio
> Projects\Finity Engine VS
> 2003\stlport-boost-test\Debug\BuildLog.htm"
> stlport-boost-test - 3 error(s), 0 warning(s)
> <<<---
>
> It is obvious from the compiler output that
> libboost_filesystem-vc71-mt-sgdp-1_32.lib was linked,
> yet the compiler complains about unresolved symbols.
>
> When I comment out the line related to
> boost::filesystem from tmain(), it works perfectly. But
> I need boost::filesystem and quite a few other
> libraries for my real projects, so this is not an
> option. Also, I have no problem linking to boost when
> not using stlport, but I'd really like to take
> advantage of the neat debuging mode built into stlport.
>
> Someone from the STLPort forums suggested that I might
> try the latest CVS versions for boost and STLPort, so I
> did this yesterday (14th of Sept. 2005). I made sure
> that what I downloaded from CVS was indeed STLPort 5.0
> / Boost 1.33, I recompiled everything and changed the
> headers path to the new version, but the problem stayed
> absolutely the same.
>
> I am really clueless on how to proceed. I have also
> tried posting to the boost and stlport forums, but
> nobody seemed to be able to help. Any help would be
> immmensely appreciated. Thanks!
> }}}
New description:
{{{
Hi,
I have been trying for over 2 days to install Boost in
VC .NET 2003 alongside with STLPort , and despite
several different settings, I am always getting the
same linker errors.
First I tried using STLPort 4.6.1 with boost 1.32.
Here's a short, but complete description of what I have
tried:
First I downloaded and unzipped STLPort 4.61. Then I
ran the vcvars batch and installed STLPort with
nmake clean all -f vc71.mak
nmake install -f vc71.mak
Then I Installed boost 1.32 with
bjam "-sTOOLS=vc-7_1-stlport"
"-sSTLPORT_PATH=C:\...\stlport"
"-sSTLPORT_VERSIONS=4.6.1" "-sstlport-iostreams=on" install
This takes a while to complete, but seems to work fine
except for a few errors with the datetime package,
which I am not using anyway. I entered the boost /
stlport header and lib directories into Visual studio
and made sure they are on top of the other include
directories.
Then I created a dummy project with the following files:
stdafx.h:
--->>>>
#ifdef NDEBUG
# undef _STLP_DEBUG
#else
# define _STLP_DEBUG 1
#endif
#define BOOST_LIB_DIAGNOSTIC
#include <iostream>
#include <tchar.h>
<<<---
and the main.cpp:
--->>>>
#include "stdafx.h"
#include <boost/filesystem/convenience.hpp>
#include <vector>
using namespace _STL;
int _tmain(int argc, _TCHAR* argv)
{
//forcing native mode in boost paths just to make sure
that boost::filesystem has to be linked successfully
boost::filesystem::path::default_name_check(boost::filesystem::native);
vector<int> test;
test.push_back(1);
vector<int>::iterator Iter=test.begin();
Iter++;
int testint=*Iter; // iterator overrun error just to
see if the debug mode is working nicely
return 0;
}
<<<---
When I try to compile it, it fails with the following
liker errors:
--->>>>
Compiling...
stlport-boost-test.cpp
Linking to lib file:
libboost_filesystem-vc71-mt-sgdp-1_32.lib
Linking...
stlport-boost-test.obj : error LNK2019: unresolved
external symbol "public: static void __cdecl
boost::filesystem::path::default_name_check(bool
(__cdecl*)(class _STL::basic_string<char,class
_STL::char_traits<char>,class _STL::allocator<char> >
const &))"
(?default_name_check_at_path@filesystem_at_boost@@SAXP6A_NABV?$basic_string_at_DV?$char_traits_at_D@_STL@@V?$allocator_at_D@2@@_STL@@@Z_at_Z)
referenced in function _main
stlport-boost-test.obj : error LNK2019: unresolved
external symbol "bool __cdecl
boost::filesystem::native(class
_STL::basic_string<char,class
_STL::char_traits<char>,class _STL::allocator<char> >
const &)"
(?native_at_filesystem@boost@@YA_NABV?$basic_string_at_DV?$char_traits_at_D@_STL@@V?$allocator_at_D@2@@_STL@@@Z)
referenced in function _main
Debug/stlport-boost-test.exe : fatal error LNK1120: 2
unresolved externals
Build log was saved at "file://e:\documents and
settings\Wunibald Wunderlich\My Documents\Visual Studio
Projects\Finity Engine VS
2003\stlport-boost-test\Debug\BuildLog.htm"
stlport-boost-test - 3 error(s), 0 warning(s)
<<<---
It is obvious from the compiler output that
libboost_filesystem-vc71-mt-sgdp-1_32.lib was linked,
yet the compiler complains about unresolved symbols.
When I comment out the line related to
boost::filesystem from tmain(), it works perfectly. But
I need boost::filesystem and quite a few other
libraries for my real projects, so this is not an
option. Also, I have no problem linking to boost when
not using stlport, but I'd really like to take
advantage of the neat debuging mode built into stlport.
Someone from the STLPort forums suggested that I might
try the latest CVS versions for boost and STLPort, so I
did this yesterday (14th of Sept. 2005). I made sure
that what I downloaded from CVS was indeed STLPort 5.0
/ Boost 1.33, I recompiled everything and changed the
headers path to the new version, but the problem stayed
absolutely the same.
I am really clueless on how to proceed. I have also
tried posting to the boost and stlport forums, but
nobody seemed to be able to help. Any help would be
immmensely appreciated. Thanks!
}}}
Comment:
I can't see this being relevant any longer.
--
Ticket URL: <http://svn.boost.org/trac/boost/ticket/481#comment:4>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.
This archive was generated by hypermail 2.1.7 : 2017-02-16 18:49:57 UTC