Mailing List Archive

Support open source code!


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

tlug: gcc use



Hi, I'm a newbie in linux (just installed Vine Linux last week).
Well, I wanted to learn OpenGL programming, so I downloaded stuffs like
GL lib and include files from MESA site. The HOWTO says that I'm 
supposed to copy all the GLlib and includes in /usr/local/lib and
/usr/local/includes respectively.  Then I tested with demos and they
didn't run.. So I copied the lib and includes again from the original
to /usr/lib and /usr/includes. And this time, it worked fine. All the
demos (except ones which need hardware acceleration) ran.
   So now I tried to compile one of the sample codes that came with
the lib. However, it won't compile. gcc returns:

$ gcc hello.c
/tmp/cca031351.o: In function `display':
/tmp/cca031351.o(.text+0x9): undefined reference to `glClear'
/tmp/cca031351.o(.text+0x20): undefined reference to `glColor3f'
/tmp/cca031351.o(.text+0x2a): undefined reference to `glBegin'
/tmp/cca031351.o(.text+0x3e): undefined reference to `glVertex3f'
/tmp/cca031351.o(.text+0x52): undefined reference to `glVertex3f'
/tmp/cca031351.o(.text+0x66): undefined reference to `glVertex3f'
/tmp/cca031351.o(.text+0x7a): undefined reference to `glVertex3f'
/tmp/cca031351.o(.text+0x82): undefined reference to `glEnd'
/tmp/cca031351.o(.text+0x87): undefined reference to `glFlush'
......

What am I missing?  Do I need to specify some sort of path to the
lib or includes?

I know this is not really linux-related problem...  but I find this
ML very active compared to the others I know (nobody answered 
problems with my printer...).   well, if you think it's totally
irelevant, just ignore this, if not, much appreciated.

Thanks
------------------------------------------------------------------------
Munenari Fukuda                           "Methodology, like sex,is
School of Engineering & Applied Science    better demonstrated than
University of Pennsylvania                 discussed, though often
e-mail : fukudam@example.com          better anticipated than
address: Box 747, Harrison                 experienced."
         3910 Irving Street                   --Edward Leamer
         Philadelphia, PA 19104
------------------------------------------------------------------------
-------------------------------------------------------------------
Next Technical Meeting: October 9 (Sat), 13:30   place: Temple Univ.
* Linux Internationalisation Initiative (Li18nux) speaker: Akio Kido
* Japanese TrueType Fonts                     speaker: Adrian Havill
Next Technical Meeting: November 13 (Sat), 13:30 place: Temple Univ.
* Network Security                               speaker: Steve Baur
Next Nomikai:  December 17 (Fri), 19:00 Tengu TokyoEkiMae 03-3275-3691
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links