LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 07-05-2001, 10:50 AM   #1
ascii2k
Member
 
Registered: Dec 2000
Location: Indiana
Distribution: Red Hat 7.3/Mandrake 8.2/9.0
Posts: 154

Rep: Reputation: 30
Free Pascal question


OK, I have a question about the Free Pascal compiler. I know it's a long shot that anyone else would use this, but hey Pascal is what works for me so here goes. FP is similar to Turbo Pascal etc in this it allows you to use "units". One of these units is called GRAPH. This gives you the ability to change screen modes, etc. The problem is, when I try to compile ANY program using this unit, I get a message that the linker is unable to find "-lvga". I have a pretty good idea that this is a VGA library of some kind that I don't currently have. So, would anyone have any idea where I might be able to find this VGA library?? Thanks!
 
Old 07-05-2001, 04:06 PM   #2
isajera
Senior Member
 
Registered: Jun 2001
Posts: 1,635

Rep: Reputation: 45
well... my first and most immediate advice is to learn C

i haven't used pascal in about seven years, so this is just general advice, but linker problems are usually solved by most compilers by just adding the link to the compile line. "fpc file.pascal -lvga", or something like that. if that doesn't work, try -Lvga. this is what works for the cc and gcc compiler. i don't know about the free pascal compiler.

as for the libraries, just do a search on yahoo for "pascal libraries".. it brought up several GNU ftp sites on just the first search.
 
Old 07-05-2001, 04:16 PM   #3
ascii2k
Member
 
Registered: Dec 2000
Location: Indiana
Distribution: Red Hat 7.3/Mandrake 8.2/9.0
Posts: 154

Original Poster
Rep: Reputation: 30
well, thanks for the advice but I am already aware of most people's opinion of pascal. I also think C is over rated, but that's a whole different discussion. Regardless, it(Pascal) is the language I have the most experience with. I HAVE tried to lean C. I'm sure part of it was my fault but it just didn't click. Besides, for what I am doing, pascal is more than suitable.
Second, the message I get is generated automatically. Fp tries to compile and then link the program. I'm sure that the GRAPH unit just needs this library. I will however try a search engine. Thanks again.
 
Old 07-06-2001, 03:16 PM   #4
notlinus
Member
 
Registered: May 2001
Location: Kingsport, TN
Distribution: RedHat 6.1
Posts: 61

Rep: Reputation: 15
Cool I like pascal too (Delphi, anyway)

The following is from the Free Pascal FAQ. I am probably violating copyrights by posting, but here goes...

Why can't the linker find "vga"?
This error typically looks like this:

Free Pascal Compiler version 1.0.x [xxxx/yy/zz] for i386
Copyright (c) 1993-2000 by Florian Klaempfl
Target OS: Linux for i386
Compiling test.pp
Assembling test
Linking test
/usr/bin/ld: cannot find -lvga
test.pp(6,4) Warning: Error while linking Closing script ppas.sh 5 Lines
compiled, 0.2 sec


This error is not an error in the installation of FPC or FPC itself, but a missing SVgalib library in your Linux install. Please install the svgalib library using your favourite package manager tool

 
Old 07-06-2001, 03:46 PM   #5
ascii2k
Member
 
Registered: Dec 2000
Location: Indiana
Distribution: Red Hat 7.3/Mandrake 8.2/9.0
Posts: 154

Original Poster
Rep: Reputation: 30
THANKS!! I'm not sure how I missed that but thats my problem. I thought I found the svga lib thought..oh well. Maybe I will just try reinstalling the svgalib. Thanks again. BTW, I like Delphi too, I just don't have the $$ to buy it. I would really like to try Kylix but it is $200.
 
Old 08-20-2001, 10:25 AM   #6
ascii2k
Member
 
Registered: Dec 2000
Location: Indiana
Distribution: Red Hat 7.3/Mandrake 8.2/9.0
Posts: 154

Original Poster
Rep: Reputation: 30
Question New question

Hi.. I have a new question for those few of us who still know Pascal... This is kind of specific to Free Pascal since thiat is what I use...

Anyway,
FP has a "socket" unit that allows you to do network communications. Somewhere, there is an example program called serverex.pas that should how to make a simple chat program using IP addresses in pascal. Does anyone knwo where I could find that? OK, that's a long shot. Then how about this..Does anyone have any pascal source code using the socket unit to connect IP addresses? Any help is appreciated as always.
 
Old 12-01-2005, 01:01 PM   #7
wykthorr
Member
 
Registered: Oct 2004
Location: Brasov, Romania
Distribution: Ubuntu
Posts: 38

Rep: Reputation: 15
I also get a linker error

I have just let Kylix down in favor of fpc I just realized that I would have been an idiot to spend 200$ on an outdated piece of software that only works on certain versions of linux.
I have built a cgi program that connects to a MySQL database. The problem is that when I try to compile the app I get an error: "/usr/bin/ld: cannot find -lmysqlclient"
Any idea what's missing?
 
Old 11-04-2006, 03:05 PM   #8
wkgreeno
LQ Newbie
 
Registered: Jan 2005
Posts: 1

Rep: Reputation: 0
severex

Quote:
Originally Posted by ascii2k
Hi.. I have a new question for those few of us who still know Pascal... This is kind of specific to Free Pascal since thiat is what I use...

Anyway,
FP has a "socket" unit that allows you to do network communications. Somewhere, there is an example program called serverex.pas that should how to make a simple chat program using IP addresses in pascal. Does anyone knwo where I could find that? OK, that's a long shot. Then how about this..Does anyone have any pascal source code using the socket unit to connect IP addresses? Any help is appreciated as always.
After seeing your question, I searched my MickeyMouse machine and found serverex.pp in
"source\docs\sockex\. If it would be any help,
I could email it to you.
I downloaded FPC several years ago to run on my MickeyMouse machine. It conains many linux examples that I cannot compile because they require a linux unit.
I also found other references to it on the web
using alltheweb.com and searching for serverex only. Adding other words caused search to fail.
I'm at wkgreeno@yahoo.com. use "linux" in the
subject to avoid being flushed as junk.
 
Old 11-04-2006, 08:29 PM   #9
gruntwerk
Member
 
Registered: Dec 2003
Location: PA
Distribution: fc9
Posts: 89

Rep: Reputation: 15
ldconfig?

Quote:
Originally Posted by wykthorr
I have just let Kylix down in favor of fpc I just realized that I would have been an idiot to spend 200$ on an outdated piece of software that only works on certain versions of linux.
I have built a cgi program that connects to a MySQL database. The problem is that when I try to compile the app I get an error: "/usr/bin/ld: cannot find -lmysqlclient"
Any idea what's missing?

have you run ldconfig?
try adding -Fl/usr/lib/mysql to your command line and see if it compiles.
if so : you may also need to edit your /etc/fpc.cfg file and add the line

-Fl/usr/lib/mysql

good luck
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone help me with Pascal? randyriver10 Programming 2 09-29-2005 04:09 PM
question about free and ram dr_zayus69 Linux - Hardware 2 01-07-2005 06:43 AM
Linuxant Free Trial question Nubbin49 Linux - Wireless Networking 0 06-28-2004 09:57 PM
Programming like question (context-free grammar) true_atlantis Programming 4 03-10-2004 11:04 AM
Pascal question hfawzy Programming 3 01-10-2003 06:22 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 12:03 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration