Include Header xxxxx.h is not used directly
-
wrote on 2 Mar 2023, 07:12 last edited by
Could it be that there's another header called "system.h" than the one you expect is pulled from somewhere else? can you show your compiler command line (compile output pane)?
-
Could it be that there's another header called "system.h" than the one you expect is pulled from somewhere else? can you show your compiler command line (compile output pane)?
wrote on 2 Mar 2023, 07:16 last edited by -
Kindly help bro .....@Imman_Manny There is a system system.h header file. I guess QtCreator thinks you're including that one, but not using. You should avoid using names for header files which are already used for system header files.
-
@Imman_Manny There is a system system.h header file. I guess QtCreator thinks you're including that one, but not using. You should avoid using names for header files which are already used for system header files.
wrote on 2 Mar 2023, 08:16 last edited byI changed the Header name still error remains .
-
Kindly help bro .....wrote on 2 Mar 2023, 08:18 last edited by@Imman_Manny
You show you have a Sources > Controllers > system.cpp file. Do you even have a Headers > Controllers > system.h file? Otherwise as @jsulm says you might be best avoiding asystem.h
named file and possibly asystem
class.While we are on this one of my bug-bears about code written here by beginners. The C++ "standard" is for class names to begin with an uppercase letter, and Qt observes that everywhere. Why people then choose to write classes with lowercase first character is quite beyond me, it goes against convention and makes code harder to read. I would not recommend "system" as a class name, but if you do why in the world don't you make it
System
? -
I changed the Header name still error remains .
wrote on 2 Mar 2023, 08:21 last edited by@Imman_Manny said in Include Header xxxxx.h is not used directly:
I changed the Header name still error remains .
Now that you have changed off it being named
system.h
. I am not sure what that IDE message is trying to tell you here. It says "fix available", if you click on that or try Alt+Enter or whatever it is that "applies" the suggested fix, what is it that the IDE changes in your code? -
@Imman_Manny said in Include Header xxxxx.h is not used directly:
I changed the Header name still error remains .
Now that you have changed off it being named
system.h
. I am not sure what that IDE message is trying to tell you here. It says "fix available", if you click on that or try Alt+Enter or whatever it is that "applies" the suggested fix, what is it that the IDE changes in your code?wrote on 2 Mar 2023, 08:40 last edited by@JonB its remove the Include LoL. really dont have clue .Help
-
@JonB its remove the Include LoL. really dont have clue .Help
wrote on 2 Mar 2023, 08:57 last edited by JonB 3 Feb 2023, 08:58@Imman_Manny
Now classsystem
is undefined. Presumably it is declared inonesystem.h
? Put the#include "onesystem.h"
back in, and if the IDE still complains ignore it. Try compiling your code and verify that works. -
@Imman_Manny
Now classsystem
is undefined. Presumably it is declared inonesystem.h
? Put the#include "onesystem.h"
back in, and if the IDE still complains ignore it. Try compiling your code and verify that works.wrote on 2 Mar 2023, 10:18 last edited byBro .. actually i need your help for another Task
- I have multiple qml file (converted from svg Drawing )
- I want to list like grid view but its in different size .
- And If OnDoubleclicked it should be fit to the screen.
Please give me some tips to try.
-
Bro .. actually i need your help for another Task
- I have multiple qml file (converted from svg Drawing )
- I want to list like grid view but its in different size .
- And If OnDoubleclicked it should be fit to the screen.
Please give me some tips to try.
wrote on 2 Mar 2023, 10:21 last edited by@Imman_Manny
Then ask a new question, presumably in the QML sub-forum. You don't want my help because I have never used QML. -
wrote on 26 Nov 2024, 01:46 last edited by
false positives for this are so common, it doesn't look like it actually will look past includes that include macros that refer to other symbols in the same subset, this was the case with ncurses, which (unfortunately) loves to declare function-macros (or 'funcros'). My ballpark is that they are expanding the macro, and the since the end result is technically not in the same file, but deeper in, it is missed altogether.
Funny how it fails the minute you remove the #include... its almost comical :p
-
false positives for this are so common, it doesn't look like it actually will look past includes that include macros that refer to other symbols in the same subset, this was the case with ncurses, which (unfortunately) loves to declare function-macros (or 'funcros'). My ballpark is that they are expanding the macro, and the since the end result is technically not in the same file, but deeper in, it is missed altogether.
Funny how it fails the minute you remove the #include... its almost comical :p
@osirisgothra this is a last warning - stop reviving old posts.