最近、私はLinux 3.10 x86_64でeastlライブラリを構築しようとしていますが、失敗しました。 eastlライブラリの作成方法
https://github.com/electronicarts/EASTL
は、ここでは、Webページ "ソースのコンパイル" していません:https://github.com/electronicarts/EASTL/blob/master/CONTRIBUTING.md
は指示に従うとlibEASTL.aを取得し、AR -t libEASTL.a取得:allocator_eastl.cpp.o
assert.cpp.o
fixed_pool.cpp.o
hashtable.cpp.o
intrusive_list.cpp.o
numeric_limits.cpp.o
red_black_tree.cpp.o
string.cpp.o
thread_support.cpp.o
小さなテストソース:
EASTL-マスター/ -I /ホーム/火星/ツール/ EASTLを含める/グラム++ --std = C++ 11 -O2 test1.cpp -I /ホーム/火星/ツール:で、それをコンパイル
へ
未定義の参照:-master /テスト/パッケージ/ EABase /含める/共通/home/mars/tools/EASTL-master/thelib/libEASTL.a -o test1.exe
はリンクエラーを取得します'operator new [](unsigned long、char const *、int、unsigned int、char const *、int)'
eastlライブラリには、ルードヘッダーファイル、 私はそれを欠場している、どんなアドバイスをいただければ幸いです。
編集:
この新しい機能を追加した後、リンクエラーはなくなりました。
void* operator new[](size_t size, const char* pName,
int flags, unsigned debugFlags, const char* file, int line)
{
;
}
残っている問題は次のとおりです。この新しい機能を正しくコーディングする必要があります。 それを行うには、どのような文書が私に手がかりを与えることができますか?
EDIT2:このウェブサイトの情報に基づいて
:
https://wuyingren.github.io/howto/2016/02/11/Using-EASTL-in-your-projects/
void* operator new[](size_t size, const char* pName, int flags, unsigned debugFlags, const char* file, int line)
{
return malloc(size);
}
void* operator new[](size_t size, size_t alignment, size_t alignmentOffset, const char* pName, int flags, unsigned debugFlags, const char* file, int line)
{
return malloc(size);
}
、その後の作業が行われています。
するTryの#include –
@Tony、の#includeはまだ –
barfatchen
https://rawgit.com/electronicarts/EASTL、 "未定義の参照" の問題があります/master/doc/EASTL%20FAQ.html#Info.15 –