Can't link to Xlib in KDevelop 2.1.3 - Xwindows

This is a discussion on Can't link to Xlib in KDevelop 2.1.3 - Xwindows ; I'm new to KDevelop. I wrote a short program that need to link to the XLib. I can compile using gcc by typing: gcc -Wall -o JToolkit -L/usr/X11R6/lib -lX11 In KDevelop, I went into the Build options and, under linker, ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Can't link to Xlib in KDevelop 2.1.3

  1. Can't link to Xlib in KDevelop 2.1.3

    I'm new to KDevelop. I wrote a short program that need to link to the XLib.
    I can compile using gcc by typing:

    gcc -Wall -o JToolkit -L/usr/X11R6/lib -lX11

    In KDevelop, I went into the Build options and, under linker, clicked Xlib.

    The program compiles fine in KDevelop with no errors or warnings, but when I
    try to execute, the program errors out. Can someone guide me through
    compiling X-wise programs in KDevelop.

    Thanks!
    Tom
    --

    Tom Bitsky, Jr
    tbj@automateddesign.com

    Automated Design Corporation
    P: (630) 783-1150 F: (630) 783-1159



  2. Re: Can't link to Xlib in KDevelop 2.1.3

    Thomas Junior wrote:

    > I'm new to KDevelop. I wrote a short program that need to link to the XLib.
    > I can compile using gcc by typing:
    >
    > gcc -Wall -o JToolkit -L/usr/X11R6/lib -lX11
    >
    > In KDevelop, I went into the Build options and, under linker, clicked Xlib.
    >
    > The program compiles fine in KDevelop with no errors or warnings, but when I
    > try to execute, the program errors out. Can someone guide me through

    ^^^^^^^
    What, execute or link?

    > compiling X-wise programs in KDevelop.


    You know the command line, how to tell your IDE the people in
    comp.windows.x.kde probably know better.

    Regards,
    Daniel

  3. Re: Can't link to Xlib in KDevelop 2.1.3

    Thomas Junior wrote:
    > I'm new to KDevelop. I wrote a short program that need to link to the XLib.
    > I can compile using gcc by typing:
    >
    > gcc -Wall -o JToolkit -L/usr/X11R6/lib -lX11
    >
    > In KDevelop, I went into the Build options and, under linker, clicked Xlib.
    >
    > The program compiles fine in KDevelop with no errors or warnings, but when I
    > try to execute, the program errors out. Can someone guide me through
    > compiling X-wise programs in KDevelop.


    If you want help resolving errors don't you think it might be useful to
    post the error messages you are seeing?


    Does the error message indicate that one or more libraries can't be
    found? At link time you explicitly direct the compiler and linker to
    the location of the libraries with your -L switches. At runtime you
    may have to also direct the executable to those libraries. Look at the
    ld manpage for rpath or RPATH and the ld.so mappage for LD_LIBRARY_PATH.


    -- ced

    >
    > Thanks!
    > Tom
    > --
    >
    > Tom Bitsky, Jr
    > tbj@automateddesign.com
    >
    > Automated Design Corporation
    > P: (630) 783-1150 F: (630) 783-1159
    >
    >



    --
    Chuck Dillon
    Senior Software Engineer
    NimbleGen Systems Inc.


+ Reply to Thread