Jump to content

i need help compiling C progerammes


Recommended Posts

hey guys at the nexus forum ive been looking for help on a specific subject for months with no sucsess so i thought i would ask here:

ive been trying to compile my C with borland tc++ and other compilers and get an error message saying:

cannot open include file stdio.h

and

cannot create ***.obj

their is nothing wrong with what i wrote this happens with all c,c++ projects i try to compile

so once again this 14 year old begs for help

Link to comment
Share on other sites

I think you need put that file in the right folder so the compiler can Call them...or you need edit the script (XXX.c) then edit the line

#include "foldername here\stdio.h"

if this is your first time making stuff, i think it would be best if you did some example scripts..if success then you can try with your scripts...

I'd suggest to use Akelpad as script editor.

Link to comment
Share on other sites

Hi,

 

it seems like your compiler cant find the stdio.h. The easiest way to make the compiler find it is to set the directory to your setpath environment. If you have installed borland it should be set the right way (win32bit console application i think :unsure: ), i think it is a directory like ...borland\include. With borland you need to mind another problem, if you want to make a c project you have to create one. There are simpler c environments out there ;). One we used to have at the university was pelles c (it was free the time i have learned c).

 

Sarah

 

Btw, to check if the environment is working the right way, try to use a simple code for it like:

 

#include <stdio.h>

 

void main(){

printf("Hi Sarah");

}

Edited by Paxan_1
Link to comment
Share on other sites

Hi Jonathan,

 

I hold myself back to be sure you was not just a passing by person...

 

What Bandit Ngebak and Paxan_1 says is mandatory! If your install of a C compiler can't find stdio.h you have a major problem.

Whatever setup/installer I'm aware of know where to find it's own include files and a major branch of standard library files also. If what ever you got hold of don't... Well, I would start to question the source of the stuff.

 

It sound's you try run compilations from the command prompt in a console window, kind of cute l33t stance :smile:

Mostly nowadays you start fancy some sort of IDE to make things easier, Install that and stay with that until someone can over provve you there is something better to use.

 

Still, Paxan_1 give an easy example of what often otherwise is considered as the "Hello Wold!" example. Have you successfully completed this kind of compilation exercise? If not you still have major problem with your install and environment setup to be even capable to run the most basic C compilation tasks.

 

If you present what you tested and what the outcome was it will make lot more people able to respond...

 

In general Borland Yeah! they was great!, outstanding!, superior! and so on, but nowadays after all the selling and fusions and renaming and re-brandings I'm not sure the core is still there.

 

If you got hold of some kind of an old Borland C release I would suggest you try a MinGW GCC release for windows instead! or even the complete Code::Blocks IDE environment :teehee:

And for all others I KNOW Microsoft have a free Visual C++ environment for download but to say that one is easy to play with, is like to place a fly rookie into a Boing 747 cockpit and demand him to take off because one size fits all...

Link to comment
Share on other sites

Hi Jonathan,

 

I hold myself back to be sure you was not just a passing by person...

 

I was thinking the same way, but i was working as an assistant teacher at the university and these kind of questions are very common if you try to have a look at it the first time.

 

What Bandit Ngebak and Paxan_1 says is mandatory! If your install of a C compiler can't find stdio.h you have a major problem.

Whatever setup/installer I'm aware of know where to find it's own include files and a major branch of standard library files also. If what ever you got hold of don't... Well, I would start to question the source of the stuff.

 

It sound's you try run compilations from the command prompt in a console window, kind of cute l33t stance :smile:

Mostly nowadays you start fancy some sort of IDE to make things easier, Install that and stay with that until someone can over provve you there is something better to use.

Most of the c compilers you can dl will take the setup procedure and set all directories for you. If it is a simple copy paste, you have to do it by yourself. Take a compiler which will do it for you, will save time and brain ;)

 

Still, Paxan_1 give an easy example of what often otherwise is considered as the "Hello Wold!" example. Have you successfully completed this kind of compilation exercise? If not you still have major problem with your install and environment setup to be even capable to run the most basic C compilation tasks.

 

Hihi, thats true, but Sarah sounds nicer :D

 

In general Borland Yeah! they was great!, outstanding!, superior! and so on, but nowadays after all the selling and fusions and renaming and re-brandings I'm not sure the core is still there.

 

If you got hold of some kind of an old Borland C release I would suggest you try a MinGW GCC release for windows instead! or even the complete Code::Blocks IDE environment :teehee:

And for all others I KNOW Microsoft have a free Visual C++ environment for download but to say that one is easy to play with, is like to place a fly rookie into a Boing 747 cockpit and demand him to take off because one size fits all...

 

Borland is great, one of the best environments i have ever used. I think one of the old ones is free (but not sure, please check it yourself, we had one installed at the university pc pool). VC++ is a story for its own, if you need an advice which one to use, go for Borland. But if you use it be aware it is using some non common library, like the conio.h. Btw, i would also suggest a book where you can have a look if you have problems. I was always using "C++ by Bjarne Stroustrup", not easy to read, not a beginners guid, but a good book for c and c++ related questions.

 

Sarah

Edited by Paxan_1
Link to comment
Share on other sites

thanx for the replies i'l definatly be looking into that book and (hello,wold)and(hi sarah) :) you know first learning bethesda's scripts definatly helps understand bigger languages ,so thnx to bethesda too
Link to comment
Share on other sites

thanx for the replies i'l definatly be looking into that book and (hello,wold)and(hi sarah) :) you know first learning bethesda's scripts definatly helps understand bigger languages ,so thnx to bethesda too
Link to comment
Share on other sites

thanx for the replies i'l definatly be looking into that book and (hello,wold)and(hi sarah) :) you know first learning bethesda's scripts definatly helps understand bigger languages ,so thnx to bethesda too
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...