私はeVC 4.0からVisual Studio 2008へのC++コードの移植に取り組んでいます。私たちの目標はWindows Mobile 6.1で、私たちのアプリケーションにWindows Mobile 6.0 SDKを使用しています。VS2008のSTLポートを使用
私たちのコードでは、eVC 4でコンパイルしたときにstlポートを使用していましたが、可能であればstl portを引き続き使用したいと考えています。
アプリケーションにSTLポート(5.2.1)を組み込むために必要な手順を知っている人はいませんか?ソリューションにインクルードディレクトリを設定しましたが(eVC 4.0プロジェクトの場合と同じですが)、独自のクラスでlist push_backまたはvector insertコマンドを使用しようとすると、エラーが発生します(下記参照)。私たちのクラス "TriangleBufferElement"で)。これらのコマンドは、int、doubleなどのネイティブ型で動作するように見えます。
すべてのクラスに適切なコンストラクタ、コピーコンストラクタ、代入演算子、および比較演算子があり、すべて正しいものであることが保証されています。
アイデア?
C:\Program Files\Windows CE Tools\stlport\stl/_construct.h(119) : error C2665: 'operator new' : none of the 2 overloads could convert all the argument types
1> C:\Program Files\Windows Mobile 6 SDK\PocketPC\include\../../../Windows Mobile 6 SDK\PocketPC\Include\Armv4i/new(61): could be 'void *operator new(unsigned int,const std::nothrow_t &) throw()'
1> while trying to match the argument list '(unsigned int, TriangleBufferElement *)'
1> C:\Program Files\Windows CE Tools\stlport\stl/_construct.h(134) : see reference to function template instantiation 'void stlp_std::_Copy_Construct_aux<_Tp>(_Tp *,const _Tp &,const stlp_std::__false_type &)' being compiled
1> with
1> [
1> _Tp=TriangleBufferElement
1> ]
1> C:\Program Files\Windows CE Tools\stlport\stl/_vector.h(381) : see reference to function template instantiation 'void stlp_std::_Copy_Construct<_Tp>(_Tp *,const _Tp &)' being compiled
1> with
1> [
1> _Tp=TriangleBufferElement
1> ]
1> C:\Program Files\Windows CE Tools\stlport\stl/_vector.h(376) : while compiling class template member function 'void stlp_std::vector<_Tp>::push_back(const _Tp &)'
1> with
1> [
1> _Tp=TriangleBufferElement
1> ]
1> c:\srcdevbranch\pointlib\dtmconverter\dtm\dtmreader\.\trianglebuffer.h(47) : see reference to class template instantiation 'stlp_std::vector<_Tp>' being compiled
1> with
1> [
1> _Tp=TriangleBufferElement
1> ]
を定義したのか? –
はい、エラーを回避するためにpre/codeタグを使用してください。 – crashmstr