Click here to Skip to main content
16,018,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
For some reason when i try to run any script with #include <godot.hpp> it outputs "<godot.hpp> file not found" while i can see it in my folder and already put the directory in the include_path.

please help

What I have tried:

I tried to see if I did any mistake on the header path but there weren't any
Posted
Updated 8-Aug-22 5:05am

1 solution

If the file is in the project directory then you need to use double quotes, not angle brackets:
C++
#include "godot.hpp" // find this file in project directory
 
Share this answer
 
Comments
Member 15731179 9-Aug-22 1:31am    
it still didn't work but I found something helpful, all my godot library folders are not being read. So I just need to find out how to include their paths in a right way.

My paths are:

"${workspace}/**",
"${workspace}/godot-cpp/include/**",
"${workspace}/godot-cpp/include/gen**",
"${workspace}/godot-cpp/include/core**",
"${workspace}/godot/modules/**",
Richard MacCutchan 9-Aug-22 3:19am    
You need to add them to the directories list in Visual Studio, so they are passed on to the compiler and linker at build time. Right click on the project in Solution Explorer, and select "Properties". Now click on the "VC++ Directories" link in the left hand window of the dialog. You can now add the directories to the Include and Lib sections as required.
Member 15731179 11-Aug-22 0:49am    
sorry, but I'm using VSCode on Linux, so I can't follow your instructions
Richard MacCutchan 11-Aug-22 3:08am    
My apologies, I was assuming Visual Studio in Windows. I have not used the C++ Extension in VS Code.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900