Thread: [Plib-users] Cannot compile
Brought to you by:
sjbaker
From: Peter P. <pet...@st...> - 2004-08-24 08:40:10
|
I have installed plib via gentoo's portage system, and several apps are compiling fine, just not mine :-( This is my app: #include <plib/ssg.h> int main() { ssgRoot* r = new ssgRoot; delete r; return 0; } Here is my compile command: g++ ssg.cc -o ssg_test -lplibsg -lplibssg -lplibul And here is some of the output: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x4): In function `glIsValidContext()': : undefined reference to `glXGetCurrentContext' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x69f): In function `ssgCullAndPick(ssgRoot*, float*, float*)': : undefined reference to `glGetIntegerv' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x71e): In function `ssgCull ... : undefined reference to `glDisable' /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssgLeaf.o)(.text+0x2b0): In function `ssgLeaf::makeDList()': : undefined reference to `glEndList' collect2: ld returned 1 exit status What am I doing wrong? -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? |
From: Peter P. <pet...@st...> - 2004-08-24 09:51:06
|
Peter Poulsen wrote: > I have installed plib via gentoo's portage system, and several apps are > compiling fine, just not mine :-( > > This is my app: > #include <plib/ssg.h> > > int main() > { > ssgRoot* r = new ssgRoot; > delete r; > > return 0; > } > > Here is my compile command: > g++ ssg.cc -o ssg_test -lplibsg -lplibssg -lplibul > > And here is some of the output: > > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x4): > In function `glIsValidContext()': > : undefined reference to `glXGetCurrentContext' > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x69f): > In function `ssgCullAndPick(ssgRoot*, float*, float*)': > : undefined reference to `glGetIntegerv' > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x71e): > In function `ssgCull > ... > > : undefined reference to `glDisable' > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssgLeaf.o)(.text+0x2b0): > In function `ssgLeaf::makeDList()': > : undefined reference to `glEndList' > collect2: ld returned 1 exit status > > > What am I doing wrong? > Ups. If I change my compile command to: g++ ssg.cc -o ssg_test -lplibsg -lplibssg -lplibul -lGL I get the following error instead: /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x71e): In function `ssgCullAndPick(ssgRoot*, float*, float*)': : undefined reference to `sgMakePickMatrix(float (*) [4], float, float, float, float, float*)' ... /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssgSaveATG.o)(.text+0x590): In function `ssgSaveATG(char const*, ssgEntity*)': : undefined reference to `sgMakeNormal(float*, float const*, float const*, float const*)' collect2: ld returned 1 exit status -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? |
From: Peter P. <pet...@st...> - 2004-08-24 13:19:03
|
Peter Poulsen wrote: > Peter Poulsen wrote: > >> I have installed plib via gentoo's portage system, and several apps >> are compiling fine, just not mine :-( >> >> This is my app: >> #include <plib/ssg.h> >> >> int main() >> { >> ssgRoot* r = new ssgRoot; >> delete r; >> return 0; >> } >> >> Here is my compile command: >> g++ ssg.cc -o ssg_test -lplibsg -lplibssg -lplibul >> >> And here is some of the output: >> >> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x4): >> In function `glIsValidContext()': >> : undefined reference to `glXGetCurrentContext' >> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x69f): >> In function `ssgCullAndPick(ssgRoot*, float*, float*)': >> : undefined reference to `glGetIntegerv' >> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x71e): >> In function `ssgCull >> ... >> >> : undefined reference to `glDisable' >> /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssgLeaf.o)(.text+0x2b0): >> In function `ssgLeaf::makeDList()': >> : undefined reference to `glEndList' >> collect2: ld returned 1 exit status >> >> >> What am I doing wrong? >> > Ups. If I change my compile command to: > g++ ssg.cc -o ssg_test -lplibsg -lplibssg -lplibul -lGL > > I get the following error instead: > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssg.o)(.text+0x71e): > In function `ssgCullAndPick(ssgRoot*, float*, float*)': > : undefined reference to `sgMakePickMatrix(float (*) [4], float, float, > float, float, float*)' > ... > /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/../../../libplibssg.a(ssgSaveATG.o)(.text+0x590): > In function `ssgSaveATG(char const*, ssgEntity*)': > : undefined reference to `sgMakeNormal(float*, float const*, float > const*, float const*)' > collect2: ld returned 1 exit status > I think I nail it. For some reason -lplibsg works best if it is last. -- A: Because it messes up the order in which people normally read text. Q: Why is it such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail? |