- #1
Buffu
- 849
- 146
I am familiar with linking external libraries in IDE like Eclipse, Netbeans etc. But in my college they use use vim for programming on Linux. To learn more about vim editor I installed it on my home computer.I can compile basic C++ programs on it with one or two .cpp/.h files. I think it is awesome for C++ programming and now I want to move my OpenGL project from Visual Studios to vim. Before I did anything I released I don't know how to link external libraries (GLEW and GLFW) from cmd.
Please tell how can I link external libraries from cmd, if possible from vim (some vim script or plugins) ?
I am using Mingw compiler.
This is my current vimrc file,
Please tell how can I link external libraries from cmd, if possible from vim (some vim script or plugins) ?
I am using Mingw compiler.
This is my current vimrc file,
Code:
set nocompatible
source $VIMRUNTIME/vimrc_example.vim
source $VIMRUNTIME/mswin.vim
behave mswin
set diffexpr=MyDiff()
function MyDiff()
let opt = '-a --binary '
if &diffopt =~ 'icase' | let opt = opt . '-i ' | endif
if &diffopt =~ 'iwhite' | let opt = opt . '-b ' | endif
let arg1 = v:fname_in
if arg1 =~ ' ' | let arg1 = '"' . arg1 . '"' | endif
let arg2 = v:fname_new
if arg2 =~ ' ' | let arg2 = '"' . arg2 . '"' | endif
let arg3 = v:fname_out
if arg3 =~ ' ' | let arg3 = '"' . arg3 . '"' | endif
let eq = ''
if $VIMRUNTIME =~ ' '
if &sh =~ '\<cmd'
let cmd = '""' . $VIMRUNTIME . '\diff"'
let eq = '"'
else
let cmd = substitute($VIMRUNTIME, ' ', '" ', '') . '\diff"'
endif
else
let cmd = $VIMRUNTIME . '\diff'
endif
silent execute '!' . cmd . ' ' . opt . arg1 . ' ' . arg2 . ' > ' . arg3 . eq
endfunction
:cd E:\C++\
:set tabstop=4
:set shiftwidth=4
:set expandtab
call plug#begin('~/vimfiles/bundle')
Plug '[PLAIN]https://github.com/WolfgangMehner/vim-plugins.git'[/PLAIN]
Plug '[PLAIN]https://github.com/vim-syntastic/syntastic.git'[/PLAIN]
Plug '[PLAIN]https://github.com/scrooloose/nerdtree.git'[/PLAIN]
Plug '[PLAIN]https://github.com/ervandew/supertab.git'[/PLAIN]
call plug#end()
Last edited by a moderator: