More verbose Error message
Hi, Thanks for your tool, we are using it to run an inventory system with a bluetooth barcode reader and it's working quite well now. However, there were a few things I found while getting it to run:
softwedge.c:138 When $DISPLAY is not defined, the message "softwedge: can't open " is not really helpful. What cannot be opened? (Empty String) How about something like this:
fprintf(stderr, "%s: can't open X11 window [%s]\nIs $DISPLAY defined?\n", "softwedge", XDisplayName(NULL));
Also, I ran into some problems when running it as user in a new environment:
sudo env -i sh -c 'export DISPLAY=":0"; /usr/local/bin/softwedge'
fails with a 'No protocol specified' Error from XOpenDisplay. When running as normal user it works fine. I din't investigate this issue further as it works for me (running it as a normal user is safer anyway).
Last, I couldn't compile it with your makefile, as it couldn't link some X stuff. Instead I used this command:
g++ -Wall -Isw -O2 -Lsw -o softwedge sw/main.c sw/softwedge.c -Isw -lX11 -lXtst
My system: A farly virgin Ubuntu 12.04.1 (Kernel 3.2.0-32-generic, 64bit).
Cheers, iliis
Thanks for the note - many of these should be quick fixes.
Hi theatrus,
We need to use this in an installation of ours, but are struggling to get it installed, would you be able to assist? error
cc -Wall -Isw -O2 -c sw/softwedge.c -o sw/softwedge.o sw/softwedge.c:24:22: fatal error: X11/Xlib.h: No such file or directory #include <X11/Xlib.h>
Tried creating directories but still not working.
Make sure to install the relevant X11 / Xorg development packages for your distribution.
What are you running?
Hi
I am running Ubuntu 14.4 LTS.
I found a self install package on the net for Softwedge. So I am good.
Thanks for the reply. Regards PS. maybe just update the comments with dependencies.
On 12 Mar 2016, at 2:42 AM, Yann Ramin [email protected] wrote:
Make sure to install the relevant X11 / Xorg development packages for your distribution.
What are you running?
— Reply to this email directly or view it on GitHub https://github.com/theatrus/softwedge/issues/1#issuecomment-195617595.
for rpm based rhel clones these packages need to be installed: libX11-devel libXtst-devel