Login  Register

Re: Problems building JOGL: [cc] /usr/bin/ld: cannot find -lstdc++

Posted by Sven Gothel on Dec 17, 2014; 2:01am
URL: https://forum.jogamp.org/Problems-building-JOGL-cc-usr-bin-ld-cannot-find-lstdc-tp4033761p4033766.html

On 12/16/2014 11:19 PM, rmshelby [via jogamp] wrote:

> Hello,
> I am brand new to JOGL.  I've been trying to build JOGL on Fedora 20,
> according to the instructions here:
> http://jogamp.org/jogl/doc/HowToBuild.html 
> No problems with gluegen.  jogl compiles but fails to link:
>       [cc] Starting link
>        [cc] /usr/bin/ld: cannot find -lstdc++
>        [cc] collect2: error: ld returned 1 exit status
>
> I can't understand how this is possible; libstdc++.so is of course present in
> /usr/lib64, and the 32bit version in /usr/lib.
> I hope someone can give me an idea what the cause of this is and how to fix.
We only use stdc++ for oculusvr (OVR)
                <linkerarg location="end" value="-Wl,-Bstatic"                 if="isGCC"/>
                <linkerarg location="end" value="-lstdc++" />
                <linkerarg location="end" value="-Wl,-Bdynamic"                if="isGCC"/>

+++

[1] Check whether a plain libstdc++.so is installed/avail.

On Debian, if installed the dev packages, e.g.
  libstdc++-4.9-dev:amd64
  lib32stdc++-4.9-dev

you will have the following standard symlinks:

/usr/lib/gcc/x86_64-linux-gnu/4.9/libstdc++.so -> ../../../x86_64-linux-gnu/libstdc++.so.6
/usr/lib/gcc/x86_64-linux-gnu/4.9/32/libstdc++.so -> ../../../../../lib32/libstdc++.so.6

which allows usage of '-lstdc++' at compilation!

+++

[2] Disable OVR:
  ant -Dc.build.oculusvr.skip=true ...

+++

Hope it helps.

~Sven



signature.asc (828 bytes) Download Attachment