Sign in with
Sign up | Sign in
Your question

Turboc++ / codeblocks

Last response: in Apps General Discussion
Share
February 10, 2013 6:55:52 AM

i have windows 7. i downloaded dosbox turbo c++. but when i try to run a graphics.h header file . it does not run.i also downloaded codeblocks.
but it said "this file has not been built yet".
what is the problem??

More about : turboc codeblocks

a b L Programming
February 10, 2013 10:56:46 AM

When you attempt to run a program from within an IDE, it has to go through several stages before it actually launches and begins running. These stages are generally compile, build and run.

Compile basically checks for any errors, and if none are found (or they're minor enough to only be warnings), the IDE will then translate your program into machine language to then be ran. The compile command only works on the current file you actively have open within the editor; it does not compile your entire project.

Because you can, and usually do, have more than one file in a program, you must compile the entire project before it can be ran. This is done by selecting "build", which should be somewhere near the compile option within the menus. Building a project also links necessary files, such as libraries, to your program. If everything is all good, you can then select the run command, which then creates an executable and launches your program.

So you need to build the program, or in other words compile the entire project, before you can successfully run your program.
m
0
l
February 11, 2013 10:54:41 AM

"fatal error: graphics.h: No such file or directory" this is what i got.
cant i run graphics program in codeblocks
m
0
l
Related resources
a b L Programming
a b $ Windows 7
February 11, 2013 11:24:51 AM

Check that that header exists in a diectory listed in your INCLUDE path. If not, modify the path.
m
0
l
a b L Programming
February 11, 2013 12:33:24 PM

Make sure that you've imported the graphics.h file to your project, and then add "#include <graphics.h>" (but without the parenthesis) at the beginning of your main.cpp file; or whatever you've named the main file.

Build and then run.
m
0
l
February 15, 2013 10:18:01 AM

i included the graphics header file which showed error message "fatal error: graphics.h: No such file or directory" how to modify the path?@Ijack
m
0
l
!