Skip to content
Advertisement

Error while compiling lsnes emulator on ubuntu

I’m currently trying to get the Mario project from https://github.com/aleju/mario-ai to work on my ubuntu (16.04) system. I followed the tutorial and already solved some errors, but now I get something that looks like a compile error on the lsnes emulator and that doesn’t make sense to me.

My command is LDFLAGS="-L/usr/lib -L/usr/local/lib -L/usr/lib/x86_64-linux-gnu" CFLAGS="-I/usr/include -I/usr/local/include -I/usr/include/lua5.1" make. I added the flags trying to solve my last error.

This is the error that I get:

JavaScript

bit.hpp:

JavaScript

I’m not really familiar with C++, but the file looks fine to me.

Do you have any idea what could be the problem? I already tried the solution suggested at the only other question regarding lsnes that I found here (link error with “undefined lua_xxxxx” when building lsnes), but it didn’t help.

Advertisement

Answer

I just looked closer at your call to g++ and you are using the option -std=c++0x. That tells the compiler to use the C++11 standard. However, as stated in my comment, the code you posted requires at least C++14 to work. So use the option -std=c++14 instead and it should work.

Advertisement