PCem cannot compile with printer support

Discussion of development and patch submission.
Post Reply
Bogus
Posts: 22
Joined: Tue 31 Jan, 2017 2:16 pm

PCem cannot compile with printer support

Post by Bogus »

I cannot compile PCem with printer enabled support.
After run ninja command, compilation fails.
Compilation log:

Code: Select all

[1/330] Building C object experimental/printer_epsonlx810/CMakeFiles/printer_epsonlx810.dir/plugin.c.obj
C:/Users/bogra/msys64/home/bogra/pcem/experimental/printer_epsonlx810/plugin.c: In function 'set_printer_path':
C:/Users/bogra/msys64/home/bogra/pcem/experimental/printer_epsonlx810/plugin.c:18:9: warning: implicit declaration of function 'append_slash' [-Wimplicit-function-declaration]
   18 |         append_slash(printer_path, 512);
      |         ^~~~~~~~~~~~
C:/Users/bogra/msys64/home/bogra/pcem/experimental/printer_epsonlx810/plugin.c: In function 'init_config':
C:/Users/bogra/msys64/home/bogra/pcem/experimental/printer_epsonlx810/plugin.c:37:9: warning: implicit declaration of function 'append_filename' [-Wimplicit-function-declaration]
   37 |         append_filename(s, pcem_path, "printer/", 512);
      |         ^~~~~~~~~~~~~~~
[2/330] Generating wx-ui/wx-resources.cpp
[3/330] Building C object experimental/printer_epsonlx810/CMakeFiles/printer_epsonlx810.dir/lpt_epsonlx810.c.obj
FAILED: experimental/printer_epsonlx810/CMakeFiles/printer_epsonlx810.dir/lpt_epsonlx810.c.obj
C:\Users\bogra\msys64\mingw64\bin\cc.exe -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXMSW__ -Dprinter_epsonlx810_EXPORTS -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/bus -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/cdrom -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/codegen -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/cpu -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/devices -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/disc -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/flash -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/floppy -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/hdd -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/ide -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/joystick -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/keyboard -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/lpt -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/memory -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/mfm -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/models -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/mouse -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/networking -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/plugin-api -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/scsi -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/sound -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/video -IC:/Users/bogra/msys64/home/bogra/pcem/includes/private/wx-ui -IC:/Users/bogra/msys64/home/bogra/pcem/includes/public -IC:/Users/bogra/msys64/mingw64/include/SDL2 -IC:/Users/bogra/msys64/mingw64/include/AL -isystem C:/Users/bogra/msys64/mingw64/lib/wx/include/msw-unicode-3.0 -isystem C:/Users/bogra/msys64/mingw64/include/wx-3.0 -isystem C:/Users/bogra/msys64/mingw64/include/freetype2  -MD -MT experimental/printer_epsonlx810/CMakeFiles/printer_epsonlx810.dir/lpt_epsonlx810.c.obj -MF experimental\printer_epsonlx810\CMakeFiles\printer_epsonlx810.dir\lpt_epsonlx810.c.obj.d -o experimental/printer_epsonlx810/CMakeFiles/printer_epsonlx810.dir/lpt_epsonlx810.c.obj -c C:/Users/bogra/msys64/home/bogra/pcem/experimental/printer_epsonlx810/lpt_epsonlx810.c
C:/Users/bogra/msys64/home/bogra/pcem/experimental/printer_epsonlx810/lpt_epsonlx810.c:96:10: fatal error: pcem/unsafe/config.h: No such file or directory
   96 | #include <pcem/unsafe/config.h>
      |          ^~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
[4/330] Building C object src/CMakeFiles/pcem.dir/bus/mca.c.obj
[5/330] Building C object src/CMakeFiles/pcem.dir/cdrom/cdrom-null.c.obj
[6/330] Building C object src/CMakeFiles/pcem.dir/bus/pci.c.obj
[7/330] Building CXX object src/CMakeFiles/pcem.dir/cdrom/cdrom-image.cc.obj
[8/330] Building CXX object experimental/printer_epsonlx810/CMakeFiles/printer_epsonlx810.dir/wx-imagesave.cc.obj
ninja: build stopped: subcommand failed.
Even, if /mingw64/include/pcem/unsafe/config.h exist is another error, 'mouselocked' undeclared (first use this function).
I want to try printer support, but not compile.
Sorry, if thread already exist, but i not found.
User avatar
MichaelJManley
Posts: 54
Joined: Fri 17 Dec, 2021 9:42 pm

Re: PCem cannot compile with printer support

Post by MichaelJManley »

Printer support is experimental. The reason it fails to compile is due to API changes and it's not been put into the printer code yet.

The README does state that experimental code may not work or build.
Bogus
Posts: 22
Joined: Tue 31 Jan, 2017 2:16 pm

Re: PCem cannot compile with printer support

Post by Bogus »

I know, that is experimental, too bad.
Is some documentation to write plugins?
PCem can be compiled with api plugins support, only there is no sample plugin, only for printer is.
Post Reply