Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

[MOVED] #include <sys/io.h> file not found

Status
Not open for further replies.

shaswat

Advanced Member level 4
Full Member level 1
Joined
Jul 2, 2013
Messages
115
Helped
1
Reputation
2
Reaction score
1
Trophy points
18
Visit site
Activity points
963
Hi all,

I am working on writing my device driver code. This time I write code for my DB-25 parallel port, but for this I have to use
Code:
sys/io.h
header file. As per my compiler error, its not found in directory. For this, I download the header file and insert in the directory. But still error found.
What now I have to do? Is there any other header file for low level port input output ???

Thanks.....
 

Re: #include <sys/io.h> file not found

Perhaps u'll get better answers in the "PC Programming and Interfacing" or "Embedded Systems and Real-Time OS
" forums.
 
Do you understand to which directory #include <sys/xxx> refers? It's the compiler's include/sys directory, not the application dir. Apparently your compiler isn't a regular PC or embedded compiler, otherwise io.sys would be already in place. You can of course change the #include statement to any place where io.sys can be found, e.g. "io.sys" for the application dir. But makes the content of io.sys sense for this compiler?
 

Hello,

please post the command you are compiling with, e.g. gcc -foo -bar.

Arnobert
 

Re: [MOVED] #include &lt;sys/io.h&gt; file not found

Hello,

please post the command you are compiling with, e.g. gcc -foo -bar.

Arnobert

I am using "make" command to compile my code.

- - - Updated - - -

Do you understand to which directory #include <sys/xxx> refers? It's the compiler's include/sys directory, not the application dir. Apparently your compiler isn't a regular PC or embedded compiler, otherwise io.sys would be already in place. You can of course change the #include statement to any place where io.sys can be found, e.g. "io.sys" for the application dir. But makes the content of io.sys sense for this compiler?

Please can you elaborate or put some light on your comment
it's the compiler's include/sys directory, not the application dir.
. And of course I use "io/sys.h" in my running directory. But that also not helps.
 

I meaned you need to understand what's the difference between
Code:
#include <sys/io.h>
and
Code:
#include "io.h"

And should use the correct #include syntax for actual file location.
 

I meaned you need to understand what's the difference between
Code:
#include <sys/io.h>
and
Code:
#include "io.h"

And should use the correct #include syntax for actual file location.

I also tried with
Code:
#include "io.h"
but that header file include another header file names
Code:
features.h
. This time again I download it, saved in my current working directory. Now, I have an error with message
Code:
#include <sys/cdefs.h> 
No such file or directory
.
 

io.h has the definition of low-level runtime functions, some compilers have it in the general include directory <io.h>, some have it under <sys/io.h>. It's ususally referencing other include files. Copying io.h from a different compiler doesn't necessarily work, instead you should find out how the respective functions are provided by your compiler, if it has io.h and where it is located. It may be necessary to modify also the code itself, write wrapper functions or at least some #defines.

This are necesary steps when porting C code between different computer platforms or compilers.
 
Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top