Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8041

SDK • Re: how to access my header file

$
0
0
Problem is, the CMakefiles actually compile the source in a subdirectory of build/CMakeFiles, so the header file, which is either in the original directory, or maybe copied into the build directory, neither of which are explicitly referenced with the -I directive on the compile command. I've added it to the CMakeList.txt file, as suggested, and the compile command now includes a -I directive to the source directory.

The man page for GCC does say that the #include statement looks in the current directory, but as the source code is not in the current directory it needs to be specifically listed.

Is there a more formal description of the CMakeLists.txt file which describes the various statements and options? I've not been able to find one.

Statistics: Posted by billp — Sun Apr 13, 2025 12:43 pm



Viewing all articles
Browse latest Browse all 8041

Trending Articles