Hello I am trying to compile the rlottie library for i.MX RT 1050 using the MCUXpresso, I want to use it along with the LVGL however I am facing some issues with compiling it like
../rlottie/src/vector/vdrawhelper.cpp:125:10: error: 'mutex' in namespace 'std' does not name a type
125 | std::mutex mMutex;
| ^~~~~
I think it it due to my current toolchain does not support the threading? If there's any way how can I add support to it? I am new to this library and also have very littel experience with MCUXpresso, I know there's precompiled library for IMXRT1050 on freeRTOS but I want to compile it by myself for bare metal.
Current C++ Version : GNU C++ 11
Hello Rohit,
the rlottie only support meson build and cmake build. please refer to the build steps mentoned here:
https://github.com/Samsung/rlottie/blob/master/README.md
We use the cmake build mentioned in above README. I am not sure how to build rlottie using MCUXpresso.
Best Regards
Zongchun
Hello,
you can build the library using cross compiler. MCUXpresso has provided this cross compiler.
Best Regards
Zongchun
Hello @Zongchun appologies if I am not able to explain the problem enough but I tried cross compiling the rlottie library using the MCUXpresso cross compiler which is basically located at "D:\MCUXpressoIDE_11.9.0_2144\ide\tools\arm-none-eabi" and CMAKE build system but when I execute the "make -j 2" or simply "make" it still throws the same error :
/vector/vdrawhelper.cpp:64:34: error: 'mutex' is not a member of 'std'
64 | std::lock_guard<std::mutex> guard(mMutex);
I think it related to the toolchain, since there's protection macro "#ifdef _GLIBCXX_HAS_GTHREADS" which is preventing code from #include<mutex> getting compiled any idea how to enable it? if I explicitly enable it it results in errors related to gthreads?I think I might need to compile the library using RTOS toolchain but I am not sure if this will work out or not please suggest me anything that I might be doing wrong
Hello,
The precompiled library can also be used for bare metal.
Best Regards
Zongchun
Hello @zongchunyu
Thank you for your reply I like your idea of integrating the precompiled library,but I would like to build it from the source code. for now I will use the precompiled library but if it's possible then it would be great to rebuild the library from source code.
Thanks and Regards!
Rohit