Skip to content
This repository has been archived by the owner on Aug 7, 2023. It is now read-only.

Not detecting file in other directory #170

Open
nagyj2 opened this issue Mar 26, 2018 · 1 comment
Open

Not detecting file in other directory #170

nagyj2 opened this issue Mar 26, 2018 · 1 comment

Comments

@nagyj2
Copy link

nagyj2 commented Mar 26, 2018

I am working with C++ and have '#include "../include/Exceptions.h"' at the top of my code, and linter insists that the file doesn't exist even though it does. I am running the most up to date version and using the C++ grammar. When I compile with GCC in the terminal, it compiles fine. I am running High Sierra 10.13.3 and when I run "gcc --version", I get:

"Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.0.0 (clang-900.0.39.2)
Target: x86_64-apple-darwin17.4.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin"

and in the developer pane, I found:

"{"execPath":"/usr/local/Cellar/gcc/7.3.0_1/bin/g++-7","gccIncludePaths":" ","gccSuppressWarnings":false,"gccDefaultCFlags":"-c -Wall","gccDefaultCppFlags":"-c -Wall -std=c++11","gccErrorLimit":-1,"gccErrorString":"error","gccWarningString":"warning","gccNoteString":"note","compileCommandsFile":"./build/compile_commands.json"}"
(Not sure if this is needed)

@otbrown
Copy link

otbrown commented Apr 13, 2018

Hi nagyj2,

The problem is that you need to tell gcc-linter separately where the include folder is - you can see from the developer pane output that:
"gccIncludePaths": ""

You can modify this either in the package settings, or locally with a JSON file as described under "File/Project-Specific settings" at linter-gcc. One word of warning is that it expands ./ from the project root folder. If like me you have multiple projects open in atom at once you may find it easier to expand from the active file folder, which you can do using -/.

Hope that helps!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants