I have successfully built Cinder lib with:
cmake -DCINDER_TARGET_GL=es3-rpi -S . -B ../../build/ ..
cmake -DCINDER_TARGET_GL=es3-rpi -DCMAKE_BUILD_TYPE=Release -S . -B ../../build/ ..
make -j3
But when trying to build the BasicApp sample with:
cmake -DCINDER_TARGET_GL=es3-rpi -S . -B ../../build/ .. (From BasicApp/proj/cmake)
make -j3 (From BasicApp/build)
I get this error:
undefined reference to `std::filesystem::__cxx11::path::has_parent_path() const’
and it seems to originate from:
{
return mAssetDirectories;
}
void Platform::findAndAddDefaultAssetPath()
{
// first search the local directory, then its parent, up to ASSET_SEARCH_DEPTH levels up
// check at least the app path, even if it has no parent directory
auto execPath = getExecutablePath();
size_t parentCt = 0;
for( fs::path curPath = execPath; curPath.has_parent_path() || ( curPath == execPath ); curPath = curPath.parent_path(), ++parentCt ) {
if( parentCt >= ASSET_SEARCH_DEPTH )
break;
const fs::path curAssetDir = curPath / fs::path( "assets" );
if( fs::exists( curAssetDir ) && fs::is_directory( curAssetDir ) ) {
addAssetDirectory( curAssetDir );
break;
}
}
}
I have tried to build with booth GCC and Clang, resulting in the same error.
Any ideas on how to fix this?
Ok, I had to force the compiler to use C++11 , now it works!
I changed the CINDER_CXX_FLAGS in the file: Cinder/proj/cmake/libcinder_target.cmake
Then I re-build Cinder libs and then I could finally build The BasicApp sample!
Other than that problem follow this great guide by @num3ric to build Cinder on Raspberry Pi 4:
https://github.com/cinder/Cinder/blob/bb15730b3ff6865ee9f47874713d5ebf6ab6c3b0/docs/htmlsrc/guides/linux-notes/rpi4.html By the way why isn’t that guide out on this libcinder page: Cinder on Linux …it should be?
2 Likes