You are not logged in.
Pages: 1
Hi
I'm new to C and therefore also new to c.vim. Apart from the a bit bloated comments it inserts by default(that can probably be changed in the templates) I stumbled across a problem. When compiling a GTK app I need compiler options like `pkg-config gtk+-2.0 --cflags --libs`. Where can I set these options in c.vim for usage with \rc? Is it maybe even possible to only use these flags when the gtk header is included?(would be a pretty fancy feature)
Thanks
Offline
Check the documentation, 4.1. Global variables:
g:C_CCompiler "gcc"
g:C_CplusCompiler "g++"
g:C_CFlags "-Wall -g -O0 -c"
g:C_LFlags "-Wall -g -O0"
These should be what you need.
Offline
Sorry for the stupid question but can I change that from a config file or do I have to directly set it from vim(is it saved for the next time then)?
Offline
yes, no, no
Evil #archlinux@libera.chat channel op and general support dude.
. files on github, Screenshots, Random pics and the rest
Offline
Sorry again but how do I correctly change these values? I tried it via the .vimrc
set g:C_CFlags="pkg-config gtk+-2.0 --cflags --libs"
takes some time to get used to vim...
Offline
Use "let" instead of "set" for internal variables.
Offline
Thanks no it works
let g:C_CFlags = "-Wall `pkg-config --cflags gtk+-2.0` -c"
let g:C_LFlags = "-Wall `pkg-config --libs gtk+-2.0` -o
Offline
Pages: 1