Amarelle
Amarelle

Reputation: 11

Including basics library of C (unistd.h) on window

I've been programming at my school on a Mac for one month. We did C programming on an UNIX shell.

Now i'm back at home and I use my own PC that is on window 10. I have tried to make a similar set up, but i don't know much about all that. I installed git and bash, this made it like a UNIX shell. Also I have installed the gcc compiler.

So, now that i'm making a basic program, it should be working but when I make the include <unistd.h>, the shell can't find it.

I know my question is probably silly but I really couldn't find how to solve the problem. I downloaded the unistd.h file.

I also found this http://processors.wiki.ti.com/index.php/Compiler/diagnostic_messages/5

It explain that i should be putting the .h folder in some kind of defined path, but I don't know how to do that.

Does anyone know how I can fix this?

Upvotes: 1

Views: 6755

Answers (1)

ysth
ysth

Reputation: 98398

If you installed gcc as part of mingw or something similar, it should have included a unistd.h. Just having the gcc compiler is not likely to get you very far.

You probably want to start over and install something different than you did (mingw or cygwin or just set up a vm as suggested) that provides a more complete environment.

Upvotes: 2

Related Questions