Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6802485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:13:44+00:00 2026-05-26T19:13:44+00:00

I am currently running the latest version of Code-blocks in Ubuntu 11.04. I have

  • 0

I am currently running the latest version of Code-blocks in Ubuntu 11.04.
I have GTK+2, and 3 developer libraries fully installed (and working), and presumably have x11 installed. The header files are there.

However, a simple code will not compile using x11 coding.

#include "X11/Xlib.h"

int main() {
    Display *display = XOpenDisplay(0);
    Window root = DefaultRootWindow(display);
    XWarpPointer(display, None, root, 0, 0, 0, 0, 100, 100);
    XCloseDisplay(display);
    return 0;
}

This give me the readout of:

obj/Release/main.o||In function `main’:|

undefined reference to `XOpenDisplay’

undefined reference to `XWarpPointer’

undefined reference to `XCloseDisplay’

|=== Build finished: 3 errors, 0 warnings ===|

I’ve tried reading multiple webpages of ‘linking’ x11, I only find headerfiles, and not the file type asked by the linker within the compiler (That’s the wrong term for that.. it’s not a compiler.. it’s something else.. I know. Apologies)

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:13:45+00:00Added an answer on May 26, 2026 at 7:13 pm

    I don’t know what Code Blocks is, but for a normal compile/link process, you need to specify -lX11 to link with libX11.so for the Xlib functions.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently running Apache2 on my local machine, installed with the latest version
I have installed latest version of pligg on my local server. It's running fine.
Here's the scenario... We have an internal website that is running the latest version
I have two examples with the same CollectionView code running under 9.8.1 and latest.The
I've got (the currently latest) jdk 1.6.0.18 crashing while running a web application on
I'm currently running a working Spring + Apache Tiles webapp. I need to show
I have been assigned a task to upgrade JQuery 1.3.2 to the latest version
Long story short, I included OpenCV version 2.3.1 (currently the latest) in my modified
I'm currently working on a project. I've been running into a few issues with
I am running Windows 7 64-bit Ultimate under VirtualBox (latest version, 4.1.4) on my

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.