Ошибка компоновщика AngelScript G ++

Я пытаюсь использовать AngelScript на 64-битной машине Linux (Linux Mint 14). Я установил проект gnuc, который поставляется с sdk AngelScript, и попытался скомпилировать следующую команду:

g++ -fno-strict-aliasing main.cpp -langelscript

Это вызывает следующие ошибки компоновщика:

/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadManager::asCThreadManager()':
as_thread.cpp:(.text+0x12a): undefined reference to `pthread_key_create'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadManager::~asCThreadManager()':
as_thread.cpp:(.text+0x381): undefined reference to `pthread_key_delete'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadManager::CleanupLocalData()':
as_thread.cpp:(.text+0x453): undefined reference to `pthread_getspecific'
as_thread.cpp:(.text+0x4b8): undefined reference to `pthread_setspecific'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadManager::GetLocalData()':
as_thread.cpp:(.text+0x4f7): undefined reference to `pthread_getspecific'
as_thread.cpp:(.text+0x557): undefined reference to `pthread_setspecific'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadCriticalSection::TryEnter()':
as_thread.cpp:(.text+0x6a0): undefined reference to `pthread_mutex_trylock'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadReadWriteLock::asCThreadReadWriteLock()':
as_thread.cpp:(.text+0x6c5): undefined reference to `pthread_rwlock_init'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadReadWriteLock::~asCThreadReadWriteLock()':
as_thread.cpp:(.text+0x708): undefined reference to `pthread_rwlock_destroy'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadReadWriteLock::AcquireExclusive()':
as_thread.cpp:(.text+0x722): undefined reference to `pthread_rwlock_wrlock'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadReadWriteLock::ReleaseExclusive()':
as_thread.cpp:(.text+0x73c): undefined reference to `pthread_rwlock_unlock'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadReadWriteLock::AcquireShared()':
as_thread.cpp:(.text+0x756): undefined reference to `pthread_rwlock_rdlock'
/usr/local/lib/libangelscript.a(as_thread.o): In function `asCThreadReadWriteLock::ReleaseShared()':
as_thread.cpp:(.text+0x770): undefined reference to `pthread_rwlock_unlock'
collect2: error: ld returned 1 exit status

Кажется, многие вещи не определены. Я думаю, что это проблема с установкой библиотеки.

0

Решение

AngelScript требует, чтобы библиотека была определена для работы с потоками. В GNU / Linux вы можете включить это, добавив -lpthread к вашей команде компиляции, чтобы добавить потоки Posix.

0

Другие решения

Других решений пока нет …

По вопросам рекламы ammmcru@yandex.ru
Adblock
detector