trouble compiling remotepad server 'undefined reference'

708 views
Skip to first unread message

hoshi411

unread,
Mar 25, 2012, 8:10:39 PM3/25/12
to RemotePad
I'm trying to get remotepad server running on linux mint 12 lxde.

When running 'make' I get the following error:


make
gcc -lXtst -lX11 -lm -o remotepad remotepad.o ucs2keysym.o
remotepad.o: In function `handleKeyEvent':
/home/robison/RemotePad Server/X11/remotepad.c:369: undefined
reference to `XKeysymToKeycode'
/home/robison/RemotePad Server/X11/remotepad.c:371: undefined
reference to `XTestFakeKeyEvent'
remotepad.o: In function `simulateKeyWithUnichar':
/home/robison/RemotePad Server/X11/remotepad.c:379: undefined
reference to `XKeysymToKeycode'
/home/robison/RemotePad Server/X11/remotepad.c:399: undefined
reference to `XTestFakeKeyEvent'
/home/robison/RemotePad Server/X11/remotepad.c:404: undefined
reference to `XTestFakeKeyEvent'
/home/robison/RemotePad Server/X11/remotepad.c:403: undefined
reference to `XTestFakeKeyEvent'
/home/robison/RemotePad Server/X11/remotepad.c:401: undefined
reference to `XTestFakeKeyEvent'
/home/robison/RemotePad Server/X11/remotepad.c:389: undefined
reference to `XKeysymToKeycode'
/home/robison/RemotePad Server/X11/remotepad.c:394: undefined
reference to `XKeysymToKeycode'
/home/robison/RemotePad Server/X11/remotepad.c:398: undefined
reference to `XTestFakeKeyEvent'
/home/robison/RemotePad Server/X11/remotepad.c:396: undefined
reference to `XTestFakeKeyEvent'
/home/robison/RemotePad Server/X11/remotepad.c:391: undefined
reference to `XKeysymToKeycode'
remotepad.o: In function `handleKeyEvent':
/home/robison/RemotePad Server/X11/remotepad.c:365: undefined
reference to `XBell'
remotepad.o: In function `main':
/home/robison/RemotePad Server/X11/remotepad.c:125: undefined
reference to `XOpenDisplay'
/home/robison/RemotePad Server/X11/remotepad.c:130: undefined
reference to `XTestQueryExtension'
/home/robison/RemotePad Server/X11/remotepad.c:143: undefined
reference to `XCreateWindow'
/home/robison/RemotePad Server/X11/remotepad.c:148: undefined
reference to `XDisplayKeycodes'
/home/robison/RemotePad Server/X11/remotepad.c:150: undefined
reference to `XGetKeyboardMapping'
/home/robison/RemotePad Server/X11/remotepad.c:194: undefined
reference to `XGetWindowAttributes'
/home/robison/RemotePad Server/X11/remotepad.c:317: undefined
reference to `XGetWindowAttributes'
/home/robison/RemotePad Server/X11/remotepad.c:302: undefined
reference to `XFlush'
/home/robison/RemotePad Server/X11/remotepad.c:259: undefined
reference to `XTestFakeButtonEvent'
/home/robison/RemotePad Server/X11/remotepad.c:260: undefined
reference to `XTestFakeButtonEvent'
/home/robison/RemotePad Server/X11/remotepad.c:284: undefined
reference to `XTestFakeButtonEvent'
/home/robison/RemotePad Server/X11/remotepad.c:233: undefined
reference to `XTestFakeRelativeMotionEvent'
/home/robison/RemotePad Server/X11/remotepad.c:126: undefined
reference to `XDisplayName'
collect2: ld returned 1 exit status
make: *** [remotepad] Error 1


I don't often compile software and do not know how to troubleshoot
this. I have seen other people with a similar problem

http://stackoverflow.com/questions/8310240/undefined-reference-when-compiling-remotepad

but I don't really understand what I should do.

There is a folder called X11 in the directory /usr/lib

but there is no lib directory in /usr/lib/X11

not sure if that is relevant. the synaptic package manager tells me
that libXtst-dev is installed.

aren...@gmail.com

unread,
Mar 25, 2012, 11:53:56 PM3/25/12
to remo...@googlegroups.com
Yes, I was the one who posted the question. Instead of running "make" you have to run

"gcc remotepad.o ucs2keysym.o -o remotepad -lXtst -lX11 -lm -L/usr/lib".

The "make" command is really just a shell script which in your case is running

"gcc -lXtst -lX11 -lm -o remotepad remotepad.o ucs2keysym.o" command you just have to add a couple of arguments to this command to correct the error.
> --
>
> You received this message because you are subscribed to the Google Groups "RemotePad" group.
>
> To post to this group, send email to remo...@googlegroups.com.
>
> To unsubscribe from this group, send email to remotepad+...@googlegroups.com.
>
> For more options, visit this group at http://groups.google.com/group/remotepad?hl=en.
>
>
>
>

hosh...@gmail.com

unread,
Mar 27, 2012, 8:09:50 PM3/27/12
to remo...@googlegroups.com
thank you Andrew. Yes, I'm sure that must work but I was having trouble with that.

I entered 

> gcc remotepad.o ucs2keysym.o -o remotepad -lXtst -lX11 -lm -L/usr/lib

but nothing happened at all ....
so then I ran 'make' after that and got this error

> make
> make: Nothing to be done for `all'.

which some forums told me there was a missing tab somewhere and even after fixing that... nothing changed.

typing  "make install" gives me the following

> make install
> cp remotepad /usr/local/bin


thanks for your time.
> To unsubscribe from this group, send email to remotepad+unsubscribe@googlegroups.com.

andr3w321

unread,
Mar 27, 2012, 8:33:34 PM3/27/12
to remo...@googlegroups.com
It looks like it compiled and you should be able to run it by either typing "remotepad" or "cd /user/local/bin && ./remotepad"  You can check if it's running with 'ps -A | grep "remotepad"' If that doesn't work try re-running ./configure in your X11 folder to check for dependency errors or running "locate remotepad" to find the exe.  I was unable to get remotepad to work for me over wifi for whatever reason, but did manage to get it working when plugged in to ethernet.

Andrew

hosh...@gmail.com

unread,
Mar 31, 2012, 7:55:04 PM3/31/12
to remo...@googlegroups.com
wow! Youre right! it does work. not over 3g but over wifi no problem. thank you. My inexperience with compiling was holding me back... didn't know how to troubleshoot those errors but... thank you ... much appreciated.
problem solved.
Reply all
Reply to author
Forward
0 new messages