Hello,
I am trying to compile PCem but I've run into some issues.
I have all dependencies installed and my machine is Ubuntu 22.04.1 LTS x86_64.
First of all, the command line doesn't recognize the "--enable-release" option, even though it is recommended in the README.md file. I get the following error:
"
configure: WARNING: unrecognized options: --enable-release
"
Simple "./configure" works and I continue with "make". The code starts compiling and after some time I get the following error:
"
wx-main.cc:2:10: fatal error: SDL2/SDL.h: No such file or directory
2 | #include <SDL2/SDL.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:6217: pcem-wx-main.o] Error 1
make[1]: Leaving directory 'foo/PCemV17Linux/src'
make: *** [Makefile:365: all-recursive] Error 1
"
I have no idea how to fix this and why does this error occur. My knowledge about compiling is very basic. Please help.
[SOLVED] PCem v17 for Linux - compilation error with wx-main.cc:2:10
[SOLVED] PCem v17 for Linux - compilation error with wx-main.cc:2:10
Last edited by DominoV on Thu 09 Mar, 2023 9:37 pm, edited 1 time in total.
Re: PCem v17 for Linux - compilation error with wx-main.cc:2:10
Hi,
I am also new to pcem (discovered it today).
For "unrecognized options: --enable-release" message it seems there is only "-enable-release-build" now for Linux and BSD
For "SDL2/SDL.h" install "libsdl2-dev" (this is its name on Debian, and Ubuntu i guess) .
I am also new to pcem (discovered it today).
For "unrecognized options: --enable-release" message it seems there is only "-enable-release-build" now for Linux and BSD
For "SDL2/SDL.h" install "libsdl2-dev" (this is its name on Debian, and Ubuntu i guess) .
Re: PCem v17 for Linux - compilation error with wx-main.cc:2:10
Hello,
Option "-enable-release-build" works. I installed "libsdl2-dev" as you recommended but I still get the following error:
"
wx-main.cc:2:10: fatal error: SDL2/SDL.h: No such file or directory
2 | #include <SDL2/SDL.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:6217: pcem-wx-main.o] Error 1
make[1]: Leaving directory 'foo/PCemV17Linux/src'
make: *** [Makefile:365: all-recursive] Error 1
"
It seems like these libraries are not visible during compilation. Any idea how can I link them?
Option "-enable-release-build" works. I installed "libsdl2-dev" as you recommended but I still get the following error:
"
wx-main.cc:2:10: fatal error: SDL2/SDL.h: No such file or directory
2 | #include <SDL2/SDL.h>
| ^~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:6217: pcem-wx-main.o] Error 1
make[1]: Leaving directory 'foo/PCemV17Linux/src'
make: *** [Makefile:365: all-recursive] Error 1
"
It seems like these libraries are not visible during compilation. Any idea how can I link them?
Re: PCem v17 for Linux - compilation error with wx-main.cc:2:10
what is the output of:
dpkg -S SDL2/SDL.h
mine is
dpkg -S SDL2/SDL.h
mine is
Code: Select all
dpkg -S SDL2/SDL.h
libsdl2-dev:amd64: /usr/include/SDL2/SDL.h
Re: PCem v17 for Linux - compilation error with wx-main.cc:2:10
My output is:
"
libsdl2-dev:amd64: /usr/include/SDL2/SDL.h
"
I actually re-installed all required libraries, including "libsdl2-dev", and it solved the issue. I was able to compile and run the program without error. It seems it could have been a problem with broken dependencies. So in the end installing "libsdl2-dev" is what fixed the issue.
Thank you for your help.
"
libsdl2-dev:amd64: /usr/include/SDL2/SDL.h
"
I actually re-installed all required libraries, including "libsdl2-dev", and it solved the issue. I was able to compile and run the program without error. It seems it could have been a problem with broken dependencies. So in the end installing "libsdl2-dev" is what fixed the issue.
Thank you for your help.