Problem With programming in Linux, Missing Libraries
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.
Problem With programming in Linux, Missing Libraries
Ok, I have a rather simple problem, I need to write a program (to be used in my electronics project) that uses the LPT Port for communication and control however theres a serious problem with it I need it to be working on a standard Windows machine by using Borland C (So no special Libraries) however Since I do not have a Windows machine I can only write and test it on my Debian Etch box... and here start the problem of the missing Libraries I wrote a program and immediately I gotten a swarm of error, all of them are missing libraries and their functions being undefined. The missing libraries are: conio.h , dos.h , bios.h and graphics.h the commands that I need inside of them are textcolor , textbackground , clrscr , inp(ever though iostream IS included) and delay. So what do I do about the missing libraries? is there any way possible to add them to the Linux machine or am I forced to use a Windows machine to compile and test the program
most of these headers aren't "missing" they are simply dos only headers. a name like dos.h should give it away don't you think!? there are plenty of examples available online that i'm sure ou could track down via google. i remember one mini project called parapin which could be very easily pulled apart to see a simple exampleof parallel port interaction.
What you are attempting to do is certain to be non-portable. Virtually any time you need to access hardware directly, it will be non-portable.
Your best solution is to get a Windows box and Borland C compiler. Don't waste your time trying to write that kind of code on linux with any hope of portability to Windows.
Using Linux to learn how the hardware actually works would still be a useful effort, if that is the objective of the project. Linux has a few levels of code abstracting the parallel port, but I doubt that any of them are replicated in Windows.
ok so if I understood correctly theres no way to replicate the missing libs into Linux... well certainly no surprise since it is meant to work on a windows machine (that I don't have :P). guess theres no real other way to make sure the program is compilable.... well thanks anyways
ok so if I understood correctly theres no way to replicate the missing libs into Linux... well certainly no surprise since it is meant to work on a windows machine (that I don't have :P). guess theres no real other way to make sure the program is compilable.... well thanks anyways
If it's DOS based, you could just run FreeDOS in an emulator like Qemu. It supports redirecting parallel port access in the guest OS (FreeDOS) to a device in the host (linux), so it can access your parallel port. This option seems ideal, since it gives you the environment you need at no cost.
I've been working on the same thing.
As far as I know ,if you are using the inb() and outb() functions they won't work on windows xp because xp will not access the hardware directly.
Just thought i'd mention it before you start installing anything.
I've been working on the same thing.
As far as I know ,if you are using the inb() and outb() functions they won't work on windows xp because xp will not access the hardware directly.
Just thought i'd mention it before you start installing anything.
I know but theres a special patch for XP that enables usage of the LPT Parallel port, and the computer that is ment to originally run the project is patched with this just FYI :P however this patch is somewhat of a hassle to enable and need to use inp32/outp32 rather then the simple inp/outp commands
and thats for the tip 95se I'll probably do that assuming I could get a Compatible Borland Compiler
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.