0

I've been setting up vim to us as my C/C++ IDE recently and have been really impressed with the c.vim plugin (found here). However, I'm working on a project that relies on a library that is not found in my system includes. When I compile manually, I just list this directory by passing g++ an include flag (e.g. g++ -I ~/lib/). Is there any way to set up c.vim to have this directory included when I use the "save and compile" ("\rc" by default) command?

Thanks!

bencpeters
  • 149
  • 1
  • 10
  • You might check the documentation hier: http://lug.fh-swf.de/vim/vim-doc/csupport.html#csupport-custom-glob-vars It's done via the var/s mentioned there. – alk Dec 06 '11 at 07:57

1 Answers1

0

I'd would just set $CXXFLAGS to -I~/lib, it's its job -- unless you are using the dumb makefile default configuration from mingw project, $CXXFLAGS will be recognized automagically, as long as your &makeprg still points to make and not directly to g++ or any other compiler (I don't know what c.vim does with this vim setting as I don't use it).

As I suspect you don't have any Makefile in your directory but just a monofile project, I'd prefer an extended modeline over project settings.

Community
  • 1
  • 1
Luc Hermitte
  • 31,979
  • 7
  • 69
  • 83