Problem with LibTorch gcc version

I’m following this guide https://pytorch.org/tutorials/advanced/cpp_export.html to load pytorch bert model in C++, the problem is that libtorch requires gcc 5+, but I can only use gcc 4.8.5.
I’m not allowed to update gcc, so is there any solutions?
Or any other ways to load a bert model in C++?

I’m afraid we use features from gcc 5+ so you won’t be able to compile for older versions. You will need to update your gcc if you want to use the cpp API.

Thank you for replying~ but if I can only use gcc 4.8.5, is there any other methods to load or build a Bert model in C++ environment? don’t have to use pytorch to build model…

I’m afraid you won’t be able to compile cpp code if you don’t have the right version.
You might be able to compile using it as a shared library but I’m not sure it will work. You might needs to get the the pre-cxx11 ABI version though.