<div dir="ltr">So, no ideas?<br><br>On Friday, May 15, 2020 at 4:57:52 AM UTC-3, Rodrigo Dias wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi!<br><br>My program is working fine in my own machine. I want to test it in a different machine now (both using Debian 10), so I want to compile it statically. For dynamic compiling, I use:<br><br>g++ terreno1.cpp -losg -losgDB -losgGA -losgSim -losgText -losgUtil -losgViewer -o terreno1<br><br>For static, I learned <a href="https://stackoverflow.com/a/52000944/1086511" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fa%2F52000944%2F1086511\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEs6hElTdzqG1zQLyCRE7CbuUvw9w';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fstackoverflow.com%2Fa%2F52000944%2F1086511\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEs6hElTdzqG1zQLyCRE7CbuUvw9w';return true;">here</a> that I need to use -Wl,-Bstatic at the beginning of the library list, and -Wl,-Bdynamic at the end. Before that (with only the beginning part), I was getting:<br><br>/usr/bin/ld: cannot find -lgcc_s<br>/usr/bin/ld: cannot find -lgcc_s<br>collect2: error: ld returned 1 exit status<br><br>Now I get that long list of "undefined reference" through many of OSG source files (can paste it here, if you need). I've read somewhere that the order of libraries are important, so I've tried them in the order given by "make":<br><br>g++ terreno1.cpp -Wl,-Bstatic -lOpenThreads -losg -losgUtil -losgDB -losgGA -losgText -losgViewer -losgSim -Wl,-Bdynamic -o terreno1<br><br>and also in the reversed order:<br><br>g++ terreno1.cpp -Wl,-Bstatic -losgSim -losgViewer -losgText -losgGA -losgDB -losgUtil -losg -lOpenThreads -Wl,-Bdynamic -o terreno1<br><br>both with and without -lOpenThreads (which is not required for dynamic compiling). Nothing worked so far.<br><br>Can anyone please tell me what am I doing wrong? My source code can be seen <a href="https://github.com/eco-info/osgCookbook/tree/master/outros/terreno1" target="_blank" rel="nofollow" onmousedown="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Feco-info%2FosgCookbook%2Ftree%2Fmaster%2Foutros%2Fterreno1\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-Ql_nyFYlIJYnSsui2fvCe6fXag';return true;" onclick="this.href='https://www.google.com/url?q\x3dhttps%3A%2F%2Fgithub.com%2Feco-info%2FosgCookbook%2Ftree%2Fmaster%2Foutros%2Fterreno1\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF-Ql_nyFYlIJYnSsui2fvCe6fXag';return true;">here</a>.<br><br>Thanks,<br><br>Rodrigo.<br><br></div></blockquote></div>

<p></p>

-- <br />
You received this message because you are subscribed to the Google Groups "OpenSceneGraph Users" group.<br />
To unsubscribe from this group and stop receiving emails from it, send an email to <a href="mailto:osg-users+unsubscribe@googlegroups.com">osg-users+unsubscribe@googlegroups.com</a>.<br />
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/osg-users/34b5f20c-6396-4e3f-b6df-f4e135b98ee2%40googlegroups.com?utm_medium=email&utm_source=footer">https://groups.google.com/d/msgid/osg-users/34b5f20c-6396-4e3f-b6df-f4e135b98ee2%40googlegroups.com</a>.<br />