Page 2 of 2 FirstFirst 12
Results 11 to 15 of 15

Thread: Create OpenGL window on X11

  1. #11

    Re: Create OpenGL window on X11

    Try to add {$L glx.so} somewhere in the code and remove the compiler option -k-lglx
    Peregrinus, expectavi pedes meos in cymbalis
    Nullus norvegicorum sole urinat

  2. #12

    Re: Create OpenGL window on X11

    Quote Originally Posted by JSoftware
    Try to add {$L glx.so} somewhere in the code and remove the compiler option -k-lglx
    Code:
    /usr/bin/ld: cannot find glx.so
    And the same if I add {$L libglx.so}. The weird thing is that if I do use "locate" I get:
    Code:
    $ locate glx.so
    /usr/lib/nvidia/libglx.so.xserver-xorg-core
    /usr/lib/xorg/modules/extensions/libglx.so
    /usr/lib/xorg/modules/extensions/libglx.so.180.44
    I tried to load libglx.so by hand (LoadLibrary) then look for the "glXQueryExtension" function (GetProcedureAddress) and I success. I looked for a "dev" package for GLX and I've find only "libglitz-glx1-dev" but it forces "libglitz-glx1" and I'm using "libgl1-mesa-glx" library instead so should I install it?

    On the other hand, I've test the C example programs from the original Allegro library (that uses the same libs) and they worked.

    I'm very confused.
    No signature provided yet.

  3. #13

    Re: Create OpenGL window on X11

    Try {$linklib glx}. Otherwise, pass -Cn to the compiler and check link.res to see how libglx is linked to your executable (paths, lib names, etc.)
    Get your fpc4gba copy now!
    Get your fpc4nds copy now!

  4. #14

    Re: Create OpenGL window on X11

    Try adding "-k-lGL". See my mail on fpc-pascal: there's no libglx that you should link with on Linux, glX functions are inisde libGL.so.

  5. #15

    Re: Create OpenGL window on X11

    Ok. I've created a link map accidentally (I mean I don't remember which options I used but the "exbasic.map" file was created) and it has these lines inside:

    Code:
    Allocating common symbols
    Common symbol    size       file
    
     ...
    U_GLX_GLXQUERYEXTENSION
              0x4       /usr/lib/fpc/2.2.2/units/i386-linux/opengl/glx.o
     ...
    
    Linker script and memory map
    
    TARGET(elf32-i386)
     ..
    LOAD /usr/lib/fpc/2.2.2/units/i386-linux/opengl/gl.o
     ...
    LOAD lib/allegro.o
    LOAD lib/algl.o
     ..
    LOAD /usr/lib/fpc/2.2.2/units/i386-linux/opengl/glu.o
    LOAD /usr/lib/fpc/2.2.2/units/i386-linux/opengl/glx.o
    LOAD /usr/lib/fpc/2.2.2/units/i386-linux/x11/x.o
     ...
    LOAD /usr/local/lib/liballeg-4.4.0.so
    LOAD /usr/lib/libdl.so
    LOAD /usr/lib/libm.so
    LOAD /usr/lib/libX11.so
    LOAD /usr/lib/libc.so
    START GROUP
    LOAD /lib/libc.so.6
    LOAD /usr/lib/libc_nonshared.a
    LOAD /lib/ld-linux.so.2
    END GROUP
     ...
     COMMON     0x000000000809dd10   0x1a4 /usr/lib/fpc/2.2.2/units/i386-linux/opengl/glx.o
     ...
            0x000000000809dd50        U_GLX_GLXQUERYEXTENSION
     ...
     .debug_frame  0x0000000000000064    0x0 /usr/lib/fpc/2.2.2/units/i386-linux/opengl/gl.o
     ...
     .debug_frame  0x0000000000000064   0x1234 lib/allegro.o
     .debug_frame  0x0000000000001298   0x1a4 lib/algl.o
     ...
     .debug_frame  0x0000000000001694    0x0 /usr/lib/fpc/2.2.2/units/i386-linux/opengl/glu.o
     .debug_frame  0x0000000000001694    0x0 /usr/lib/fpc/2.2.2/units/i386-linux/opengl/glx.o
     ...
    I'm not sure if I've listed all related lines, but if I've understood it links the GLX library and has information about the "glXQueryExtension", but for some reason the "libagl.so" can't link it. At the the Allegro forums a developer suggested that "(...) whether linking order could possibly make a difference. ".

    This is getting weirder every day...
    No signature provided yet.

Page 2 of 2 FirstFirst 12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •