Re: gcc -c -g test5 -o test5 ...

Jens.Toerring_at_physik.fu-berlin.de
Date: 10/06/03


Date: 6 Oct 2003 14:42:51 GMT

Mylinux <myLinux@my.com> wrote:
> root@home BLCD]# gcc test5.c test5
> gcc: test5: No such file or directory

That's because you need

gcc test5.c -o test5

> test5.c:9:17: dos.h: No such file or directory
> test5.c: In function `main':
> test5.c:21: warning: return type of `main' is not `int'

That's easy to repair, use

int main( void )

(and don't forget to add a return statement).

> [root@home BLCD]#
> I added this "/* in the left hand corner of the first line but I have the
> above error.

> what is happened. dos.h is found in the linux box.

But your real problem is going to be that normal programs can't directly
access the hardware - just having a dos.h file won't help you there.
For a start read the man pages about ioperm(), inb() and outb() and
then ask yourself if it's really worth the hassle. And after having a
very short look at the program I rather doubt that this will do you
hope for. Is the device connected to the serial port (that's what
usually is at address 0x378) or to the printer port (that's what the
comments seem to indicate)?
                                    Regards, Jens

-- 
      _  _____  _____
     | ||_   _||_   _|        Jens.Toerring@physik.fu-berlin.de
  _  | |  | |    | |
 | |_| |  | |    | |          http://www.physik.fu-berlin.de/~toerring
  \___/ens|_|homs|_|oerring


Relevant Pages

  • Re: Serial Programming trouble
    ... You want to also flag that with O_NONBLOCK. ... Closes the serial port ... void close_port{ ... void send_string(char* sp, int* fd) ...
    (comp.os.linux.misc)
  • Re: Serial Programming trouble
    ... sending characters. ... Closes the serial port ... void close_port{ ... void send_string(char* sp, int* fd) ...
    (comp.os.linux.misc)
  • [PATCH 1/1] mxser, remove it
    ... -static int calloutmajor = MXSERCUMAJOR; ... * This routine is called whenever a serial port is opened. ... * enables interrupts for a serial port, linking in its async structure into ... * async structure from the interrupt chain if necessary, ...
    (Linux-Kernel)
  • RS232 Redirector Program in C using Linux
    ... developing linux aps as well as in the serial port), ... failed to get current settings ... the int handler ... nbytes = write; ...
    (comp.os.linux.development.apps)
  • Re: Class/structure/something else in class
    ... measurecurrent(channel as int) ... measureamp as this is just send a textstring to the serial port. ... Create a class for the Measure and ScanAdd properties, and make their constructors take either a reference to the serial port object or the parent object. ...
    (microsoft.public.dotnet.languages.vb)