Library Window at DevCPP - c

i'm trying to use window.h at devc++, i installed devc++ without mingw and installed MinGW32 separeted.
I'm trying to compile an souce code that have #include <window.h> but appear an error.
window.h: No such file or directory.
What can i do to be able to compile with window.h at dev c++?
At compiler options i had added path to mingw32\bin and mingw32\lib\gcc\mingw32.
What can i do to solve that?

I believe you want to use #include <windows.h> instead, which is the typical include statement for the Windows header file. Note the 's' in the windows.h.

Related

#include<windows.h> not found - how to fix this for using in Linux?

I have some C Code which includes "windows.h" header file. By trying to compile the Code, I get the error that windows.h is not found. I guess this is because I am using Ubuntu 20.04, such that the compiler doesn't know the header file. Is there a way to fix the problem?

Android Studio : include an other path in a c file

I develop an application on Android Studio, and I use the code of a C project. The 2 codes needs to be the same.
I have a C file myfile.c located in myC/abc/ with this :
#include "lib/myheader.h"
But myheader.h is located in myC/lib/
So the only way I found is :
#include "../lib/myheader.h"
But I need to keep the same code. So I can't change the file.
Is it possible? Anyone have an idea?
I use CMake to add C code to my project.
I fixed it. I add include_directories(src/main/myC) in my CMakeList.txt.

regex.h in dev-c++ (windows )

I am trying to use regex in a c program. i am using windows 10 and Dev-C++ . whenever i add header file for regex i.e.
#include <regex.h>
it gives me error
[error] regex.h: NO such file or directory.
i couldn't figure out how to download and install regex library for c in dev-c++. compiler: TDM-GCC 4.9.2 64-bit Release. Thanks for your help.
I assume there something wrong with the include path during the compilation process. There is a nice expanation of the compilation process of c/c++ applications over here, in case you're interested.
Basically, when compiling a c/c++ application, your compiler, in a first step, scans your source files and replaces all #include <file.h> with the content of file.h it finds in its search path.
Dev-c++ uses MinGW and a port of the GNU compiler collection (gcc) for the compilation process.
Now what you have to do:
Figure out whether regex.h is included in your MinGW installation (Check /usr/include.)
Adapt the include path in dev-c++
Sadly I don't have a computer running Windows nearby making it hard to help with these two steps. To install regex on MinGW this package seems promising.

Eclipse IDE won't include <stdio.h> and <stdlib.h>

Eclipse IDE on MacbookPro using (Xcode) won't include stdio.h and stdlib.h
the message given is "Unresolved inclusion: stdlib.h" and "Unresolved inclusion: "
As a result the program is not running "NULL"
I my macbook recently updated Xcode and since the update, Eclipse has not been running the same. I have tried to solve the issue using the methods provided for others but nothing has worked.
I am wondering if this has to do something with my computer updating Xcode app. None of the libraries are working for my programs.

assert.h missing when compiling with mingw

I am compiling C code with MinGW. The C code is a tcl package/extension.
(using the MinGW compilor, downloaded: mingw-get-inst-20111118.exe)
Compiling the code (e.g. the tcl package) works fine under linux.
I am running "./configure" and using the supplied "Makefile.in".
The problem is that the C code at some point includes "assert.h".
The other header files are fine, e.g. for "string.h" and "stdlib.h".
This is because the TCL sources include a subfolder called "./compat". In this filder the header files are located just in case they are not found somewhere else.
But in the "./compat" folder the file "assert.h" is missing. So I get an error.
I searched for the header file in "c:\MinGW\include" but I did not find "assert.h" there.
Either I copy my own "assert.h" in the "./compat" folder. Or I install some MinGW package that puts some "assert.h" in a subfolder of "c:\MinGW\".
=== SOLUTION: ====
c:\MinGW\include\assert.h
I was the hole time in front of me!!!
My bad! thx.
<assert.h> is part of standard C and included with the base dev package:
Did you download the dev package?
Did you download this?
http://sourceforge.net/projects/mingw/files/MinGW/Base/mingw-rt/mingwrt-3.20/
I don't know about the peculiarities of the tcl package, but if it includes its own assert.h. then you should include on on the Include path, along with the libraries that came with it.
Which IDE are your using?
It seems you downloaded only mingw partially. Download the full development package that is bundled with IDEs like Codelite and Code::Blocks.

Resources