Page 1 of 1

#include <Windows.h> error

Posted: Wed Oct 14, 2020 8:02 am
by jojoblafir
Hey guys,

I'm currently a student in a course that studies the base of C++ programming and I'm new to this so sorry if my question seems silly for some of you..

And just to be the clearest possible, we're using CodeLite 14.0,2 with TDM64-GCC-9.2.0 as our compiler.

So here's my question:

I have a lab about 2D graphics (with DirectX Windows) as an assignment in my course and I learned that you have to include <Windows.h> and "2D_graphics.h" (with of course the basic one's like <iostream> and <cstdio> and <cmath>) at the start of my program.

So that's what I did and followed the rest of the instructions to do my lab correctly.

But when I try to build and run the program it keeps on saying that <Windows.h> is an error....(I kept the DirectX window always opened in the same time)

I tried every thing to fix it like changing the < > for "" , uninstalling CodeLite and TDM and downloading them again and even downloading SDK Windows (I saw on another forum that I had to try it with this so I download it but still nothing!!).

So I really don't know what's the issue here and I have to get that lab done ASAP so any kind of help would be appreciated.

I joined a screenshot of my program but in case, it doesn't work here's the error message I get from CodeLite:

For <Windows.h> :

In included file: definition of builtin function '__rdtsc' C:\TDM-GCC-64_2\lib\gcc\x86_64-w64-mingw32\9.2.0\include\ia32intrin.h:112:1:note: error occurred here

Re: #include <Windows.h> error

Posted: Wed Oct 14, 2020 10:10 am
by eranif
You can ignore this.
It's coming from the code completion engine (clangd).
This won't affect you

Re: #include <Windows.h> error

Posted: Wed Oct 14, 2020 6:23 pm
by jojoblafir
Ok thanks but isn’t there a way to fix this error?
Because I would like to actually see my program running so that I’m sure the output is similar to my assignment instructions:(