Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failing to refresh include files #3533

Open
PhilipM190561 opened this issue Jul 28, 2023 · 1 comment
Open

Failing to refresh include files #3533

PhilipM190561 opened this issue Jul 28, 2023 · 1 comment
Labels

Comments

@PhilipM190561
Copy link

PhilipM190561 commented Jul 28, 2023

Geany version 1.33 (raspberry pi) not reloading the modified include file.
Scenario.
Project is composed of multiple project specific include and source cpp file.
One the supporting cpp file and corresponding include file is modified to add new method.
All the changes is saved.
recompile the project and it come back with an error unknown method. The unknown method is the newly added method.
Current solution.
To force the geany to reload the h file. I have to comment out the include section that refer to this modified h file.
Predictably the compiler produce an unknown method/variable.
Uncomment the include section where the h file is defined.
Recompile the project and the problem disappear.

@elextr
Copy link
Member

elextr commented Jul 28, 2023

Geany has nothing to do with compilation, all Geany does is run the compile command. The compiler operates on the files on disk, nothing to do with whats open in Geany, and what files it reads/does not read is up to the compiler. If you have saved the modifications of both the include and cpp file thats all Geany can do.

Its difficult to say what you have done to confuse the compiler, but possibly you have created a precompiled header for the include file by compiling it by itself. This makes the compiler ignore changes in the header, and kind of sounds like your problem. Delete the .gch (assuming gcc compiler) file if it exists and don't compile headers, they are intended to be included, not compilable by themselves.

@elextr elextr added the invalid label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants