mitaki28 / vscode-clang

Completion and Diagnostic for C/C++/Objective-C using Clang
MIT License
128 stars 24 forks source link

Adding new include folders #20

Closed decarvalhorobinson closed 8 years ago

decarvalhorobinson commented 8 years ago

I am using cmake and VScode on windows and I can´t find a way to make clang extension recognize my include folder to autocomplete. I have the glfw source file inside my project and I am building with cmake, everything is fine, but clang cant read the glfw/include folder.

mitaki28 commented 8 years ago

Please use clang.cflags (for C sources) or clang.cxxflags (for C++ sources) in configuration. ( README.md#Configuration) -I compiler option enable you to specify an include directory. (http://clang.llvm.org/docs/CommandGuide/clang.html#cmdoption-I)

Please note that if you specify glfw/include as a relative path from your workspace root, you need to use workspaceRoot variable and specify -I${workspaceRoot}/glfw/include. (README.md#Variables)

decarvalhorobinson commented 8 years ago

It worked perfectly, thanks so much. I am trying to use vscode intead of the Visual Studio, and I am having a hard time to read a lot of thing to get the configurations done. Linking libraries is being a pain in the ass. Thanks for spending some time to help me. :octocat: