LinuxQuestions.org
Help answer threads with 0 replies.
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 04-06-2007, 08:23 AM   #1
2Pacalypse
Member
 
Registered: Nov 2006
Posts: 102

Rep: Reputation: 15
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
 
Old 04-06-2007, 08:43 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,414

Rep: Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966Reputation: 1966
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.
 
Old 04-06-2007, 07:26 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,395
Blog Entries: 2

Rep: Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903Reputation: 903
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.

--- rod.

Last edited by theNbomr; 04-06-2007 at 07:28 PM.
 
Old 04-07-2007, 10:25 AM   #4
2Pacalypse
Member
 
Registered: Nov 2006
Posts: 102

Original Poster
Rep: Reputation: 15
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
 
Old 04-07-2007, 12:19 PM   #5
95se
Member
 
Registered: Apr 2002
Location: Windsor, ON, CA
Distribution: Ubuntu
Posts: 740

Rep: Reputation: 32
Quote:
Originally Posted by 2Pacalypse
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.
 
Old 04-07-2007, 12:32 PM   #6
cyb0rg777
Member
 
Registered: Dec 2004
Location: ~
Distribution: Debian
Posts: 143
Blog Entries: 8

Rep: Reputation: 15
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.
 
Old 04-08-2007, 08:33 AM   #7
2Pacalypse
Member
 
Registered: Nov 2006
Posts: 102

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by cyb0rg777
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
 
  


Reply

Tags
parallel, port


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Missing X libraries? kf-linux Programming 1 12-14-2006 12:05 PM
c++ libraries missing roxvogn Programming 1 03-07-2005 01:38 PM
Missing X Libraries problem albert106 Linux - Newbie 1 09-12-2004 01:34 PM
missing libraries babelfish Linux - Newbie 4 08-17-2001 02:49 AM


All times are GMT -5. The time now is 02:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration