Q
Q
Quark2021-09-24 01:02:36
C++ / C#
Quark, 2021-09-24 01:02:36

Why does error C1014 "Too many include files: depth 1024" occur?

I can't understand what it means. This error occurred after I created a new DLL and moved some of my code into it, after which this error occurred in this new DLL and in another library. Googling the error ( https://stackoverflow .com/questions/2438247/why-am... ) I realized that it arises due to the absence of something like this:

#ifdef MAINTYPES_API_EXPORTS
#define MAINTYPES_API extern "C" __declspec(dllexport)
#else
#define MAINTYPES_API extern "C" __declspec(dllimport)
#endif

However, I have this construct in all my .h files from the DLL

. Also, if these lines exist:
#include "Graphic_Library.h"
#include "Graphic_Library.cpp"

my backlight breaks and stops working. Only removing them helps, but when I remove them, I get a whole bunch of errors (you know why).

I'm attaching the code for this newest DLL. Let me know if you need anything else:
.h
https://pastebin.com/1dMpaG08

.cpp
https://pastebin.com/dgn5eJW0

Thanks in advance for your help with this issue

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexander Ananiev, 2021-09-24
@Quark_Hell

https://stackoverflow.com/questions/2582521/fatal-...

R
res2001, 2021-09-24
@res2001

Put the first line in the title . Perhaps this will save you from the error. And why are you doing it is not clear. This may indicate that you have not finalized the interface connected in the header file, or some other errors. Such a construction, of course, is not a mistake in itself, but, as a rule, this is not done.
#pragma once
#include "Graphic_Library.cpp"

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question