tdm-gcc icon indicating copy to clipboard operation
tdm-gcc copied to clipboard

Tdm gcc is manually adding header files enough ?

Open noname29 opened this issue 1 year ago • 1 comments

I have a file I want to compile yet it is missing header files. Is there a way to add components to tdm gcc from an interface, or do I download the files(headers) manually and add them to the project. If so, where do I add them in the project ? I know header files exist in C:\TDM-GCC-32\include

Also, just in case, I have these header files in my main.c,

#include <winsock2.h>
#include <Windows.h>
#include <ws2ipdef.h>
#include <ws2tcpip.h>
#include <iphlpapi.h>
#include <bcrypt.h>
#include <wincrypt.h>

as i tried to compile with gcc main.c, I got this error

main.c:8:10: fatal error: ws2ipdef.h: No such file or directory
    #include <ws2ipdef.h>
compilation terminated.

How can I find this header file? If I just find it in github is it enough to add it to C:\TDM-GCC-32\include ?

another way to ask, how can I add ws2 to tdm gcc, or how to install tdm gcc alongwith?

noname29 avatar Feb 11 '23 17:02 noname29

Hello,

you find a header file by searching it in your browser. It is a Microsoft related header files in this case, therefore some folder is not included in your project. Might be related to wrong MS VS version.

You should never add headers in C:\TDM-GCC-32\include, it is GCC compiler related only.

Ilir-Liburn avatar Oct 03 '23 14:10 Ilir-Liburn