Can't use and develop printer on the same DevTerm; libwiringpi-dev breaks printer

I wanted to do some modification to the printer driver software.

(DevTerm A06)

Trying to compile, it complains for wiringpi
printer.c:8:10: fatal error: wiringPi.h: No such file or directory

So I install:
sudo apt-get install libwiringpi-dev
This installs libwiringpi-dev and also libwiringpi2.

With this installed I am able to compile it now.
However the output file is not identical to /usr/local/bin/devterm_thermal_printer.elf.

But when I install libwiringpi, the next time I start the DevTerm, the printer does not work any more. Doesn’t print anything.
(I did not replace the original file with my compiled one yet)
File /tmp/devterm_printer.err.log contains message:

Oops: Unable to determine board revision from /proc/device-tree/system/linux,revision
or from /proc/cpuinfo
 -> No "Hardware" line
 ->  You'd best google the error to find out why.

But when I uninstall libwiringpi-dev and libwiringpi2 and reboot the DevTerm, then the printer works again, but I am again unable to compile the driver.

This is problematic because it means that cannot at the same be able to modify the driver and verify the modification, which will make debugging difficult.

How can I solve this issue?

You should compile the devterm wiringpi, I remember having similar issues.

If you check the source of that error No "Hardware" line you will see that for the devterm that part is hardcoded.