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

gcc/g++ cant find include files #1027

Closed
ghost opened this issue Feb 18, 2017 · 2 comments
Closed

gcc/g++ cant find include files #1027

ghost opened this issue Feb 18, 2017 · 2 comments

Comments

@ghost
Copy link

ghost commented Feb 18, 2017

Title sums it up, I have a cpp project with a src and include directory using, I have seen some similar issues, (#589, #603, #1024)

let g:neomake_cpp_enabled_makers = ['gcc']
let g:neomake_cpp_clang_maker = {
\ 'exe': 'g++',
\ 'args': ['-Wall', '-Iinclude', '-Wextra', '-Weverything', '-pedantic', '-Wno-sign-conversion'],
\ }

doesnt work but using clang instead works.

let g:neomake_cpp_enabled_makers = ['clang']
let g:neomake_cpp_clang_maker = {
\ 'exe': 'clang++',
\ 'args': ['-Wall', '-Iinclude', '-Wextra', '-Weverything', '-pedantic', '-Wno-sign-conversion'],
\ }

By the way, I'm operating in the parent directory to both of these files.
The error neomake outputs on the header file in the following would be: "gcc fatal error music.h no such file or directory"

stuff
#include "music.h"

Expected behavior

I expected g++ to find the header file with -Iinclude

Output of the ":verb NeomakeInfo" command

Neomake debug information

Async support: 1
Current filetype: cpp

Enabled makers

For the current filetype (with :Neomake):

  • gcc
    errorformat: '%-G%f:%s:,%-G%f:%l: %#error: %#(Each undeclared identifier is reported only
    %.%#,%-G%f:%l: %#error: %#for each function it appears%.%#,%-GIn file included%.%#,%-G %#fro
    m %f:%l,,%f:%l:%c: %trror: %m,%f:%l:%c: %tarning: %m,%I%f:%l:%c: note: %m,%f:%l:%c: %m,%f:%
    l: %trror: %m,%f:%l: %tarning: %m,%I%f:%l: note: %m,%f:%l: %m'
    args: ['-fsyntax-only', '-Wall', '-Wextra']
    get_argv: function('272')
    exe: 'g++'
    NOTE: you can define g:neomake_cpp_enabled_makers to configure it (or b:neomake_cpp_enabled_
    makers).

For the project (with :Neomake!): None.
NOTE: you can define g:neomake_enabled_makers to configure it.

Default maker settings:

  • remove_invalid_entries: 0
  • buffer_output: 1
Settings
g:neomake_place_signs = 1                                                                   
g:neomake_cpp_clang_maker = {'args': ['-Wall', '-Iinclude', '-Wextra', '-Weverything', '-ped
antic', '-Wno-sign-conversion'], 'exe': 'g++'}                                              
g:neomake_verbose = 1                                                                       
g:neomake_cpp_enabled_makers = ['gcc']                                                      
                                                                                            
shell: /bin/bash                                                                            
shellcmdflag: -c                                                                            
Windows: 0                                                                                  

:version

NVIM 0.1.7                                                                                  
Build type: Release                                                                         
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wc
onversion -O2 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-
prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENE
RATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim/src/build/config -I/build/n
eovim/src/neovim-0.1.7/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/us
r/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neo
vim/src/build/include                                                                       
Compiled by builduser                                                                       
                                                                                            
Optional features included (+) or not (-): +acl   +iconv    +jemalloc +tui                  
For differences from Vim, see :help vim-differences                                         
                                                                                            
   system vimrc file: "$VIM/sysinit.vim"                                                    
  fall-back for $VIM: "/usr/share/nvim"                                                     

:messages

"src/combox.cpp" 33L, 547C                                                                  
E492: Not an editor command: verb Neomakeinfo                                               
NVIM 0.1.7                                                                                  
Build type: Release                                                                         
Compilation: /usr/bin/cc -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -Wc
onversion -O2 -DNDEBUG -DDISABLE_LOG -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-
prototypes -std=gnu99 -Wvla -fstack-protector-strong -fdiagnostics-color=auto -DINCLUDE_GENE
RATED_DECLARATIONS -DHAVE_CONFIG_H -D_GNU_SOURCE -I/build/neovim/src/build/config -I/build/n
eovim/src/neovim-0.1.7/src -I/usr/include -I/usr/include -I/usr/include -I/usr/include -I/us
r/include -I/usr/include -I/usr/include -I/build/neovim/src/build/src/nvim/auto -I/build/neo
vim/src/build/include`   
@blueyed
Copy link
Member

blueyed commented Feb 18, 2017

You are only configuring clang in the first case also (let g:neomake_cpp_clang_maker).

@ghost
Copy link
Author

ghost commented Feb 18, 2017

using 'let g:neomake_cpp_gcc_maker' solved the problem

@ghost ghost closed this as completed Feb 18, 2017
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant