Linux / UNIX Tech Support Forum
This is a discussion on gcc linking error within the Coding in General forums, part of the Development/Scripting category; Hi, I was tryign to install svgalib for using graphics in C. Tried to install svgalib. though i followed the ...
|
|||||||
| Coding in General Discussion on PHP/Perl/Python/Ruby/GNU C or C++. MySQL, PgSQL and (X)HTML or any other programming languages you want. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Hi,
I was tryign to install svgalib for using graphics in C. Tried to install svgalib. though i followed the instructions for installation correctly to my knowledge, i am getting the following error when i tried to compile a program. gcc sample.c -o sample -lvga.c gives me the following error /usr/bin/ld: cannot find -lvga collect2: ld returned 1 exit status All the header files were installed in /usr/local/includel so used ln /usr/include/vga* -> /usr/local/include/vga* since i was trying to link vga.h. but still it did not work I have used previous gcc -lm to include math.h. any views why this error occurred? |
| Sponsored Links | ||
|
|
|
|||
|
Quote:
|
|
||||
|
Quote:
Code:
cc -Wall -Wstrict-prototypes -fomit-frame-pointer -O2 -fno-strength-reduce -pipe -g -I../include -I../gl -o sample sample.c -lvgagl -lvga |
|
||||
|
Also, you may need to configure file /etc/vga/libvga.config. It is Configuration file for svgalib.
If you don't have root level access then Other config file locations is ~/.svgalibrc i.e. /home/yourname/.svgalibrc. If you need to see examples then they are located in /usr/share/doc/svgalib/examples/
__________________
Vivek Gite Linux Evangelist |
|
|||
|
Quote:
that did not work. btw my apologies there is no -lvga.c. i did not use the .c the cc -Wall............ did not work. it still gave the same error. |
|
|||
|
Quote:
|
|
||||
|
Thanks monk it is working now.. at least I'm able to compile program... but this library is not so good... i mean it is not working the way my BC/TC graphics program works. May be I need to configure something.. not sure... any other good graphic library ?
__________________
|
|
||||
|
kavi, look like you don't have svgalib installed...btw you got which distro? If it is debain then use following command to install it:
Code:
apt-get install svgalib-bin |
|
|||
|
i use FC3. perhaps u r right. its not installed well. let me see this weekend. right now got something else to do.
thanx though, will let u know if i work it out. |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) |
|
| Thread Tools | |
| Display Modes | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Library Linking in GCC | newbie-wan | Coding in General | 1 | 18-10-2006 02:28 AM |
| Invalid ICMP type 3 code 3 error to a broadcast -samba error | raj | Linux software | 0 | 09-07-2006 04:38 AM |