Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: techsolnltd on April 14, 2015, 09:32:53 am

Title: Getting Error : termios.h no such file or directory
Post by: techsolnltd on April 14, 2015, 09:32:53 am
Hi,

I am trying to build a standard C code to be executed over linux platform but getting an error : " termios.h no such file or directory"
Can anybody guide me that how to resolve this issue.



Title: Re: Getting Error : termios.h no such file or directory
Post by: stahta01 on April 14, 2015, 04:42:13 pm
Add the package that contains the needed header. Likely libc6-dev on Debian systems.

FYI: This is likely NOT a valid CB Topic; I suggest asking Linux question on a Linux support web-site.

Edit: After verifying the header exists and if the problem still happens post the build log
http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F (http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29#Q:_How_do_I_troubleshoot_a_compiler_problem.3F)

Tim S.
Title: Re: Getting Error : termios.h no such file or directory
Post by: techsolnltd on April 15, 2015, 07:36:00 am
Hi Tim,

Thanks for your reply.
Firstly I have installed this IDE on windows platform and using gcc compiler as such.
Now tell me that what needs to be added/removed/modified in order to include termios.h
Title: Re: Getting Error : termios.h no such file or directory
Post by: stahta01 on April 15, 2015, 10:06:21 am
You need to install a cross compiler that runs under windows and compiles for Linux.

FYI: I have never found one; so, please post back if you find one that works.

Edit: Two links Google found
http://metamod-p.sourceforge.net/cross-compiling.on.windows.for.linux.html (http://metamod-p.sourceforge.net/cross-compiling.on.windows.for.linux.html)
http://www.mingw.org/wiki/HostedCrossCompilerHOWTO (http://www.mingw.org/wiki/HostedCrossCompilerHOWTO)

Edit2: Found another link that looks possible
http://stackoverflow.com/questions/4769968/c-cross-compiler-from-windows-to-linux (http://stackoverflow.com/questions/4769968/c-cross-compiler-from-windows-to-linux)

Tim S.