ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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.
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.
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
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.
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.
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?
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.