lawl / opensnap

Aero like snap feature for openbox.
BSD 2-Clause "Simplified" License
60 stars 18 forks source link

Compile error #2

Closed Marou87 closed 11 years ago

Marou87 commented 11 years ago

Hello i get this error on compile, what can i do to fix this? pls help..

marou@marou-VirtualBox:~/Desktop/opensnap$ sudo make [sudo] password for marou: mkdir -p bin g++ -Wall -o bin/opensnap -lX11 -lXrandr src/opensnap.c /tmp/cc5QjYpw.o: In function xdo_window_find_client(_XDisplay*, unsigned long, unsigned long*, int)': opensnap.c:(.text+0x31): undefined reference toXInternAtom' opensnap.c:(.text+0xab): undefined reference to XQueryTree' opensnap.c:(.text+0xc6): undefined reference toXFree' opensnap.c:(.text+0x182): undefined reference to XFree' opensnap.c:(.text+0x1c0): undefined reference toXFree' /tmp/cc5QjYpw.o: In function xdo_getwinprop(_XDisplay*, unsigned long, unsigned long, long*, unsigned long*, int*)': opensnap.c:(.text+0x279): undefined reference toXGetWindowProperty' /tmp/cc5QjYpw.o: In function main': opensnap.c:(.text+0x3d1): undefined reference toXOpenDisplay' /tmp/cc5QjYpw.o: In function sendMouseUp(_XDisplay*, unsigned long*)': opensnap.c:(.text+0x853): undefined reference toXSendEvent' opensnap.c:(.text+0x862): undefined reference to XFlush' /tmp/cc5QjYpw.o: In functiongetMousePosition(XDisplay, XEvent, mousestate_)': opensnap.c:(.text+0x910): undefined reference to XQueryPointer' /tmp/cc5QjYpw.o: In functiongetScreenSize(XDisplay, int&, int&)': opensnap.c:(.text+0x979): undefined reference to XRRSizes' opensnap.c:(.text+0x990): undefined reference toXRRGetScreenInfo' opensnap.c:(.text+0x9a7): undefined reference to XRRConfigCurrentConfiguration' /tmp/cc5QjYpw.o: In functiongetFocusedWindow(XDisplay, unsigned long_)': opensnap.c:(.text+0xa13): undefined reference to `XGetInputFocus' collect2: error: ld returned 1 exit status make: *\ [all] Error 1

lawl commented 11 years ago

Hi

Assuming a debian/ubuntu system try to install the following packages:

libx11-dev libxrandr-dev

sudo apt-get install libx11-dev libxrandr-dev

Then try to compile again. Tell me if it worked please so i can add it to the readme.

Cheers!

Marou87 commented 11 years ago

libc6-dev libx11-dev libxrandr-dev where all installed my system is 64-bit

lawl commented 11 years ago

Okay I think I fixed it. Please checkout the latest source and give me feedback. It solved the issue for me on the latest ubuntu.

This was apparently the issue: http://webpages.charter.net/ppluzhnikov/linker.html