Author Topic: Simple problem /bin/sh: 1: cannot open stdio.h: No such file  (Read 14998 times)

Offline carlyn

  • Multiple posting newcomer
  • *
  • Posts: 17
Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« on: September 20, 2014, 12:44:08 am »
I have installed code:Blocks  in Linux Mint. It's a beautiful program . my problem is that I get thre error below even with the simplest code lke gettoing Helllo world rto print to screen, its below?


#include <stdio.h>
#nclude <stlib.h>


int main()
{
    Printf("Hello world!\n");
    return 0;
}




/bin/sh: 1: cannot open stdio.h: No such file

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline carlyn

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #2 on: September 20, 2014, 01:14:29 am »
still getting error around the <stdio.h>  seems it cant find stdio.h ?

I went to the settings and spent awhile there and coulde not find a solution.

I am using linux and C not C++

Offline carlyn

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #3 on: September 20, 2014, 07:24:56 am »
I still cant get it working. I have played around with the settings. I get no errors or warnings like this .....

-------------- Build: Debug in mikesTrial (compiler: GNU GCC Compiler)---------------

/bin/sh: 1: cannot open stdio.h: No such file
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))

 

But as you can see stdio.h is still the problem ?

When I go to the build log the message is ...

||=== Build: Debug in mikesTrial (compiler: GNU GCC Compiler) ===|
||=== Build failed: 0 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|

Please help !!

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #4 on: September 20, 2014, 10:28:58 am »
What do you get when you type 'gcc -v' in bash?

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #5 on: September 20, 2014, 11:55:06 am »
Please post the content of the "Build log" (not the "Build messages") after a full rebuild and with full commandline  logging turned on.
If you do not understand what I mean look into the link provided by Tim.

Offline carlyn

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #6 on: September 20, 2014, 01:03:55 pm »
OK, This is the Build Log.....



-------------- Build: Debug in CARLYNtRYIT (compiler: GNU GCC Compiler)---------------

gcc -Wall -g -D#include <stdio.h> -D#nclude <stlib.h>  -c "/home/doom/Documents/codeblocks programs/CARLYNtRYIT/main.c" -o obj/Debug/main.o
/bin/sh: 1: cannot open stdio.h: No such file
Process terminated with status 2 (0 minute(s), 0 second(s))
0 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 

Offline carlyn

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #7 on: September 20, 2014, 01:05:44 pm »
What do you get when you type 'gcc -v' in bash?



doom@doom-System-Product-Name ~ $ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.8/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.8 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-amd64 --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-amd64 --with-arch-directory=amd64 --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

Offline scarphin

  • Lives here!
  • ****
  • Posts: 644
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #8 on: September 20, 2014, 02:36:59 pm »
I'm not a linux expert but what happens when you add '/usr/include/c++/4.8' and '/usr/lib' to compiler and linker search directories respectively in the 'global compiler settings' for your compiler?

Offline carlyn

  • Multiple posting newcomer
  • *
  • Posts: 17
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #9 on: September 20, 2014, 02:53:24 pm »
I dont know. But I booted into ubuntu instead f mint and code:blocks works fine. I installed it awhile ago. I had a couple of problems, one like i am having now and the other was I needed to get code:blocks to output to a terminal !!!!!!

Trouble is I have forgotten the steps i took  :(

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: Simple problem /bin/sh: 1: cannot open stdio.h: No such file
« Reply #10 on: September 20, 2014, 04:17:08 pm »
Code
-D#include <stdio.h> -D#nclude <stlib.h>

I suggest undefining the items above!

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org