Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » X11application with the arm-linux-gnueabi compiler(Compiler error - cannot find -lX11)
X11application with the arm-linux-gnueabi compiler [message #896320] Wed, 18 July 2012 04:19 Go to next message
Otl Nitsche is currently offline Otl Nitsche
Messages: 4
Registered: July 2012
Junior Member
Good afternoon,

I am currently developing software for embedded systems. In this case it's for a Beaglebone running Angstrom Linux.
After long struggling I am now at the point where I can compile a terminal application under eclipse CDT (indigo), using the arm-linux-gnueabi-g++ compiler and the program runs well on the beaglebone.
The next step is to develop a GUI for it and the plan is to create a X11 application, so I can ssh to the program on my host machine. The X11 libraries and includes are installed (/usr/include/X11 and /usr/lib/X11).

I added the #includes to the code:
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <X11/Xos.h>
#include <X11/Xatom.h>
#include <X11/keysym.h>


And put one of example code I found on the net into my main:
// Open a display.
	Display *d = XOpenDisplay(0);

	if ( d )
	{
	  // Create the window
	  Window w = XCreateWindow(d, DefaultRootWindow(d), 0, 0, 200,
				   100, 0, CopyFromParent, CopyFromParent,
				   CopyFromParent, 0, 0);

	  // Show the window
	  XMapWindow(d, w);
	  XFlush(d);

	  // Sleep long enough to see the window.
	  sleep(10);
	}


I added the X11 folder to the include paths in the project's settings and added "X11" to the linker libraries. However, when I try to compile I get:
Quote:
make all
Building target: MCMS_Aquarius
Invoking: GCC C++ Linker
arm-linux-gnueabi-g++ -L/usr/lib -L/usr/lib/X11 -o "MCMS_Aquarius" ./src/MCMS_Aquarius.o ./src/io.o ./src/rass.o -lX11
/usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make: *** [MCMS_Aquarius] Error 1


Can someone please point out what I am missing?

Cheers,
Otl

[Updated on: Wed, 18 July 2012 04:21]

Report message to a moderator

Re: X11application with the arm-linux-gnueabi compiler [message #896375 is a reply to message #896320] Wed, 18 July 2012 08:33 Go to previous messageGo to next message
Axel Mueller is currently offline Axel Mueller
Messages: 1964
Registered: July 2009
Senior Member
The linker path is not correct. Did you install the X11 libs for the arm architecure?

Before you ask
- search this forum
- see the FAQ http://wiki.eclipse.org/CDT/User/FAQ
- google
Re: X11application with the arm-linux-gnueabi compiler [message #896590 is a reply to message #896375] Thu, 19 July 2012 03:40 Go to previous messageGo to next message
Otl Nitsche is currently offline Otl Nitsche
Messages: 4
Registered: July 2012
Junior Member
Hallo Axel,

I wasn't aware that there is a different version for the ARM chips. I tried to use the default X11 library files...
Where can I get that package?

Cheers,
otl
Re: X11application with the arm-linux-gnueabi compiler [message #897653 is a reply to message #896590] Tue, 24 July 2012 22:46 Go to previous messageGo to next message
Otl Nitsche is currently offline Otl Nitsche
Messages: 4
Registered: July 2012
Junior Member
Bump, bump. Any idea?
Re: X11application with the arm-linux-gnueabi compiler [message #985034 is a reply to message #896320] Thu, 15 November 2012 05:17 Go to previous message
Frank Ramos is currently offline Frank Ramos
Messages: 1
Registered: November 2012
Junior Member
Hello

Yes I have the sane probleme.I need to develop a graphic interface.

Can you explain me what are the options (available software) for developing a graphic interface with windows and menus?

Thanks
Frank
Previous Topic:Associate source of project while debugging with gdbserver
Next Topic:Help: KEY_FILES_TO_PARSE_UP_FRONT Missing in Eclipse 4.2 CDT 8.1
Goto Forum:
  


Current Time: Fri Oct 24 12:04:45 GMT 2014

Powered by FUDForum. Page generated in 0.04374 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software