0
votes

I need your help..

That I miss some problem with MinGW + Gvim Compile C/C++ on Windows Platform..

My Development Environment :

-> Window 7 x64 Ultimate

-> Gvim 7.4 (with Install) [C:\Program File (x86)]

-> MinGW (with Install) [D:\MinGw]

I already Set the PATH :

INCLUDE -> D:\MinGW\include

LIB -> D:\MinGW\lib

PATH -> D:\MinGW\bin;D:\MinGW\msys\1.0\bin

So My _vimrc set Onekey Building C++ like this:

let s:windows_CPPFlags = 'g++\ -fexec-charset=gbk\ -Wall\ -g\ -O0\ -c\ %\ -o\ %<.o'

let s:linux_CPPFlags = 'g++\ -Wall\ -g\ -O0\ -c\ %\ -o\ %<.o'

Some Error Pictrue , and I try Compile the cpp file in Gvim && Windows CMD :

1: Try to Compile in Gvim . But "No such file or directory"

2: Try to Compile in CMD . Same Error with this Command?

CMD: g++ D:\Test Vim\hc.cpp -o D:\Test Vim\hc.exe

3: Success for Complie in CMD , That the file's path should be String!

CMD: g++ "D:\Test Vim\hc.cpp" -o "D:\Test Vim\hc.exe"

it Success! ths file path around with " "

So. The last Problem is that: How do I write correct in _vimrc ??

Some picture: Error Picture

1
Just not use spaces in output folder namevitalyster

1 Answers

1
votes

You can use c.vim plugin to build C++ source file with Ctrl+F9 http://www.vim.org/scripts/script.php?script_id=213