unable to compile PCem under Linux

Support and general discussion.
Post Reply
Katakis
Posts: 119
Joined: Thu 05 Mar, 2015 6:42 am

unable to compile PCem under Linux

Post by Katakis »

I am using Zorin OS 16 (Ubuntu 20.04 base) and I am installing a fresh copy of PCem v17. I am up to the stage where I am running make. Everything runs fine, until I get the following output:

Code: Select all

wx-app.h:58:29: error: invalid use of incomplete type ‘class wxCommandEvent’
   58 | class CallbackEvent: public wxCommandEvent
      |                             ^~~~~~~~~~~~~~
In file included from /usr/include/wx-3.0/wx/wx.h:24,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/event.h:632:28: note: forward declaration of ‘class wxCommandEvent’
  632 | class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
      |                            ^~~~~~~~~~~~~~
In file included from wx-main.cc:1:
wx-app.h: In constructor ‘CallbackEvent::CallbackEvent(WX_CALLBACK, void*)’:
wx-app.h:61:59: error: type ‘wxCommandEvent’ is not a direct base of ‘CallbackEvent’
   61 |         CallbackEvent(WX_CALLBACK callback, void* data) : wxCommandEvent(WX_CALLBACK_EVENT)
      |                                                           ^~~~~~~~~~~~~~
wx-app.h: In copy constructor ‘CallbackEvent::CallbackEvent(const CallbackEvent&)’:
wx-app.h:66:53: error: type ‘wxCommandEvent’ is not a direct base of ‘CallbackEvent’
   66 |         CallbackEvent(const CallbackEvent& event) : wxCommandEvent(event)
      |                                                     ^~~~~~~~~~~~~~
wx-app.h: In member function ‘wxEvent* CallbackEvent::Clone() const’:
wx-app.h:72:64: error: cannot convert ‘CallbackEvent*’ to ‘wxEvent*’ in return
   72 |         wxEvent* Clone() const { return new CallbackEvent(*this); }
      |                                                                ^
wx-app.h: At global scope:
wx-app.h:84:30: error: invalid use of incomplete type ‘class wxCommandEvent’
   84 | class PopupMenuEvent: public wxCommandEvent
      |                              ^~~~~~~~~~~~~~
In file included from /usr/include/wx-3.0/wx/wx.h:24,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/event.h:632:28: note: forward declaration of ‘class wxCommandEvent’
  632 | class WXDLLIMPEXP_FWD_CORE wxCommandEvent;
      |                            ^~~~~~~~~~~~~~
In file included from wx-main.cc:1:
wx-app.h:87:42: error: ‘wxMenu’ has not been declared
   87 |         PopupMenuEvent(wxWindow* window, wxMenu* menu, int* x, int* y) : wxCommandEvent(WX_POPUP_MENU_EVENT)
      |                                          ^~~~~~
wx-app.h:105:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
  105 |         wxMenu* GetMenu() const { return menu; }
      |         ^~~~~~
      |         wxMin
wx-app.h:112:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
  112 |         wxMenu* menu;
      |         ^~~~~~
      |         wxMin
wx-app.h: In constructor ‘PopupMenuEvent::PopupMenuEvent(wxWindow*, int*, int*, int*)’:
wx-app.h:87:74: error: type ‘wxCommandEvent’ is not a direct base of ‘PopupMenuEvent’
   87 | enuEvent(wxWindow* window, wxMenu* menu, int* x, int* y) : wxCommandEvent(WX_POPUP_MENU_EVENT)
      |                                                            ^~~~~~~~~~~~~~

wx-app.h:90:23: error: ‘class PopupMenuEvent’ has no member named ‘menu’
   90 |                 this->menu = menu;
      |                       ^~~~
wx-app.h: In copy constructor ‘PopupMenuEvent::PopupMenuEvent(const PopupMenuEvent&)’:
wx-app.h:94:55: error: type ‘wxCommandEvent’ is not a direct base of ‘PopupMenuEvent’
   94 |         PopupMenuEvent(const PopupMenuEvent& event) : wxCommandEvent(event)
      |                                                       ^~~~~~~~~~~~~~
wx-app.h:97:23: error: ‘class PopupMenuEvent’ has no member named ‘menu’
   97 |                 this->menu = event.GetMenu();
      |                       ^~~~
wx-app.h:97:36: error: ‘const class PopupMenuEvent’ has no member named ‘GetMenu’
   97 |                 this->menu = event.GetMenu();
      |                                    ^~~~~~~
wx-app.h: In member function ‘wxEvent* PopupMenuEvent::Clone() const’:
wx-app.h:102:65: error: cannot convert ‘PopupMenuEvent*’ to ‘wxEvent*’ in return
  102 |         wxEvent* Clone() const { return new PopupMenuEvent(*this); }
      |                                                                 ^
wx-app.h: At global scope:
wx-app.h:142:21: error: invalid use of incomplete type ‘class wxFrame’
  142 | class Frame: public wxFrame
      |                     ^~~~~~~
In file included from /usr/include/wx-3.0/wx/wx.h:26,
                 from wx-app.h:6,
                 from wx-main.cc:1:
/usr/include/wx-3.0/wx/utils.h:54:28: note: forward declaration of ‘class wxFrame’
   54 | class WXDLLIMPEXP_FWD_CORE wxFrame;
      |                            ^~~~~~~
In file included from wx-main.cc:1:
wx-app.h:145:54: error: ‘wxPoint’ does not name a type; did you mean ‘wxJoin’?
  145 |         Frame(App* app, const wxString& title, const wxPoint& pos,
      |                                                      ^~~~~~~
      |                                                      wxJoin
wx-app.h:146:31: error: ‘wxSize’ does not name a type
  146 |                         const wxSize& size);
      |                               ^~~~~~
wx-app.h:152:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
  152 |         wxMenu* GetMenu();
      |         ^~~~~~
      |         wxMin
wx-app.h:169:9: error: ‘wxMenu’ does not name a type; did you mean ‘wxMin’?
  169 |         wxMenu* menu;
      |         ^~~~~~
      |         wxMin
make[1]: *** [Makefile:6217: pcem-wx-main.o] Error 1
make[1]: Leaving directory '/home/gmp/PCemV17Linux/src'
make: *** [Makefile:365: all-recursive] Error 1
The error concerns WxWidgets, so I am guessing I am using the wrong version (libwxbase3.0-dev). However, if I install libwxgtk-media3.0-gtk3-dev, I get a lot of "Undefined references".
User avatar
TheMechanist
Posts: 71
Joined: Mon 03 Apr, 2017 6:59 pm
Contact:

Re: unable to compile PCem under Linux

Post by TheMechanist »

compiled it some days ago for Ubuntu 18.04 ..

Install the following packages:
libsdl2-dev
libwxbase3.0-dev
libwxgtk3.0-dev
libopenal-dev
build-essential

and do:
./configure --enable-release-build --enable-networking --enable-alsa
make
marzban2030
Posts: 6
Joined: Wed 31 Aug, 2022 1:18 am

Re: unable to compile PCem under Linux

Post by marzban2030 »

sudo apt-get update

sudo apt install libsdl2-dev libwxbase3.0-dev libwxgtk3.0-gtk3-dev libopenal-dev build-essential

./configure --enable-release-build --enable-networking --enable-alsa

make

Above commands worked for me at Ubuntu 18.04.

Necessary packages info at my Ubuntu 18.04 was:

16 upgraded, 734 newly installed, 0 to remove and 45 not upgraded.
Need to get 229 MB of archives.
After this operation, 1077 MB of additional disk space will be used.

It means that PCem need to 1GB packages to be installed to emulating little size ancient OS!
User avatar
Arjen42
Posts: 131
Joined: Fri 11 Jun, 2021 3:15 pm

Re: unable to compile PCem under Linux

Post by Arjen42 »

Same thing for any other app compiled from source that requires a similar set of libraries.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: unable to compile PCem under Linux

Post by leilei »

GUI toolkits' dev files are always big to unload. On the other hand, 1GB's small compared to what you'd have to grab to do any microsoft visual studio compiling on modern windows. It doesn't really matter what target it emulates, as you'll soon learn that there are some 5th gen console emulators that have a similar requirement for an influential Dolphin-like presentation.
User avatar
Arjen42
Posts: 131
Joined: Fri 11 Jun, 2021 3:15 pm

Re: unable to compile PCem under Linux

Post by Arjen42 »

Yeah, and if the next app you want to compile uses the same libraries, you don't have install anything. Which app is best?
marzban2030
Posts: 6
Joined: Wed 31 Aug, 2022 1:18 am

Re: unable to compile PCem under Linux

Post by marzban2030 »

8086tiny is the best!

https://github.com/adriancable/8086tiny

I tested all of below emulators:
PCem
86Box
PCjs
...

All of these consume high system hardware resources except PCjs. And PCjs is not easily configurable.
User avatar
Arjen42
Posts: 131
Joined: Fri 11 Jun, 2021 3:15 pm

Re: unable to compile PCem under Linux

Post by Arjen42 »

Did you post that message on the forums of those other emulators as well?
marzban2030
Posts: 6
Joined: Wed 31 Aug, 2022 1:18 am

Re: unable to compile PCem under Linux

Post by marzban2030 »

Yeah! Currently I have succeed with 8086tiny.

I successfully installed and ran Borland Turbo C in emulated DOS 3.20 with 8086 processor and 640kB ram by using 8086tiny emulator. Also I compiled some c files with that.

8086tiny emulator doesn't need to huge amount of system resources and packages to be installed. It's really little size.
Also it contains few files and codes which make it easy to understand and config.
User avatar
leilei
Posts: 1039
Joined: Fri 25 Apr, 2014 4:47 pm

Re: unable to compile PCem under Linux

Post by leilei »

8086tiny also doesn't emulate up to the 6th generation of computer hardware...


The whole point of 8086tiny is to show it's possible to have an emulator in some very small piece of code. It's more of a coder flex than practicality.


Also as for PCjs... have you tried compiling a modern web browser?
marzban2030
Posts: 6
Joined: Wed 31 Aug, 2022 1:18 am

Re: unable to compile PCem under Linux

Post by marzban2030 »

Just I need an ancient OS like as DOS 3.20 at 8088/8086 system to developing a fast AI C code in Borland Turbo C. The 8086tiny is suitable for me. Below is my git:

https://github.com/marzban2030/8086tiny/tree/patch-1

However, People often look for ancient OS to play nostalgic games. In this case the PCem and 86Box is the best.

PCjs only emulate some ancient OS in the web browser or nodejs.

8086tiny is best for C developers, While PCem and 86Box is best for nostalgic gamers.

Also QEMU emulator support CPUs emulation from 486 processor to modern CPUs which make it best for developers in modern OS.
Post Reply