# Building my game on Linux fails with undefined reference to \`\_\_cxa\_init\_primary\_exception'

**URL:** <https://forum.heroiclabs.com/t/building-my-game-on-linux-fails-with-undefined-reference-to-cxa-init-primary-exception/2438>\
**Category:** Client Libraries\
**Created:** [March 7, 2022, 7:44pm UTC](https://forum.heroiclabs.com/t/building-my-game-on-linux-fails-with-undefined-reference-to-cxa-init-primary-exception/2438 "2022-03-07T19:44:16Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![AndreasOOTP](https://avatars.discourse-cdn.com/v4/letter/a/c0e974/32.png) [@AndreasOOTP](https://forum.heroiclabs.com/u/AndreasOOTP)\
**Post date:** [March 7, 2022, 7:44pm UTC](https://forum.heroiclabs.com/t/building-my-game-on-linux-fails-with-undefined-reference-to-cxa-init-primary-exception/2438/1 "2022-03-07T19:44:16Z")

</div>

Hi! We’re trying to build our game for Windows, Mac, Linux, iOS and Android after adding Nakama to it.  
I downloaded the pre-built Linux libs from github (nakama-cpp-sdk\_2.5.1\_linux.7z from [Releases · heroiclabs/nakama-cpp · GitHub](https://github.com/heroiclabs/nakama-cpp/releases)) and tried them in our project but get errors like this:

nakama-cpp-sdk/libs/linux/x64/libcpprest.a(ws\_client.cpp.o): In function `web::websockets::client::details::websocket_client_task_impl::close_pending_tasks_with_error(web::websockets::client::websocket_exception const&)': ws_client.cpp:(.text+0x161d): undefined reference to `\_\_cxa\_init\_primary\_exception’  
ws\_client.cpp:(.text+0x1692): undefined reference to `std::\_\_exception\_ptr::exception\_ptr::exception\_ptr(void\*)’

We build the Linux version of our game with CPP\_FLAGS= -std=c++14 - perhaps that’s not compatible with how the Nakama libs are built? At least this looks like different standard libraries being used.

Any help will be much appreciated.
