Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More verbose Error message #1

Open
iliis opened this issue Oct 12, 2012 · 5 comments
Open

More verbose Error message #1

iliis opened this issue Oct 12, 2012 · 5 comments
Assignees

Comments

@iliis
Copy link

iliis commented Oct 12, 2012

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

@ghost ghost assigned theatrus Oct 12, 2012
@theatrus
Copy link
Owner

Thanks for the note - many of these should be quick fixes.

@PeregrineSpur
Copy link

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.

@theatrus
Copy link
Owner

Make sure to install the relevant X11 / Xorg development packages for your distribution.

What are you running?

@PeregrineSpur
Copy link

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 #1 (comment).

@mailinglists35
Copy link

for rpm based rhel clones these packages need to be installed: libX11-devel libXtst-devel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants