Linker trouble

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm wondering if anyone could enlighten me about why does --as-needed
make a difference here? (let alone the order in which -lGL appears).

[lkundrak@localhost VirtualBox-3.1.6_OSE]$ g++ -Wl,--as-needed \
>         -o out/linux.x86/release/obj/VBoxTestOGL/VBoxTestOGL \
>         out/linux.x86/release/obj/VBoxTestOGL/generic/OpenGLTestApp.o \
>         -L/usr/X11R6/lib -L/usr/lib \
>         -lGL \
>         obj/lib/VBoxOGLhostspuload.a obj/bin/VBoxOGLhostcrutil.so obj/lib/VBoxOGL2D.a \
>         obj/bin/VBoxRT.so obj/bin/VBoxRT.so obj/lib/VBoxREM.so obj/bin/VBoxVMM.so \
>         -lXcursor -lXext -lX11 \
>         obj/lib/VBoxCOM.a obj/bin/VBoxXPCOM.so \
>         /usr/lib/libQtCore.so /usr/lib/libQtGui.so /usr/lib/libQtOpenGL.so
/usr/bin/ld: obj/lib/VBoxOGL2D.a(VBoxGLSupportInfo.o): undefined reference to symbol 'glGetString'
/usr/bin/ld: note: 'glGetString' is defined in DSO /usr/lib/libGL.so so try adding it to the linker command line
/usr/lib/libGL.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
[lkundrak@localhost VirtualBox-3.1.6_OSE]$ g++ -Wl,--as-needed \
>         -o out/linux.x86/release/obj/VBoxTestOGL/VBoxTestOGL \
>         out/linux.x86/release/obj/VBoxTestOGL/generic/OpenGLTestApp.o \
>         -L/usr/X11R6/lib -L/usr/lib \
>         obj/lib/VBoxOGLhostspuload.a obj/bin/VBoxOGLhostcrutil.so obj/lib/VBoxOGL2D.a \
>         -lGL \
>         obj/bin/VBoxRT.so obj/bin/VBoxRT.so obj/lib/VBoxREM.so obj/bin/VBoxVMM.so \
>         -lXcursor -lXext -lX11 \
>         obj/lib/VBoxCOM.a obj/bin/VBoxXPCOM.so \
>         /usr/lib/libQtCore.so /usr/lib/libQtGui.so /usr/lib/libQtOpenGL.so
[lkundrak@localhost VirtualBox-3.1.6_OSE]$ g++ \
>         -o out/linux.x86/release/obj/VBoxTestOGL/VBoxTestOGL \
>         out/linux.x86/release/obj/VBoxTestOGL/generic/OpenGLTestApp.o \
>         -L/usr/X11R6/lib -L/usr/lib \
>         -lGL \
>         obj/lib/VBoxOGLhostspuload.a obj/bin/VBoxOGLhostcrutil.so obj/lib/VBoxOGL2D.a \
>         obj/bin/VBoxRT.so obj/bin/VBoxRT.so obj/lib/VBoxREM.so obj/bin/VBoxVMM.so \
>         -lXcursor -lXext -lX11 \
>         obj/lib/VBoxCOM.a obj/bin/VBoxXPCOM.so \
>         /usr/lib/libQtCore.so /usr/lib/libQtGui.so /usr/lib/libQtOpenGL.so
[lkundrak@localhost VirtualBox-3.1.6_OSE]$ 

Thank you,
Lubo

-- 
Flash is the Web2.0 version of blink and animated gifs.
                                     -- Stephen Smoogen

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux