zoukankan      html  css  js  c++  java
  • compile c cpp with cl.exe in vim

    1 touch a clc.bat

    @echo off
    set f1=%1
    set f2=%f1:.c=%
    :: Load compilation environment
    call "C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0vcvarsall.bat"
    :: Invoke compiler with any options passed to this batch file
    "C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCincl.exe" %f1%  
    echo --------------------------------------------------------------------------------------
    %f2%
    

    2 touch a clcpp.bat

    @echo off
    set f1=%1
    set f2=%f1:.cpp=%
    :: Load compilation environment
    call "C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0vcvarsall.bat"
    :: Invoke compiler with any options passed to this batch file
    "C:UsersadministratorAppDataLocalProgramsCommonMicrosoftVisual C++ for Python9.0VCincl.exe" %f1%
    echo -----------------------------------------------------------------------
    %f2%
    

    3 add clc.bat clcpp.bat to env

    4 _vimrc

    autocmd filetype c nnoremap <F5> :w! <bar> exec '!clc '.shellescape('%')<CR>
    autocmd filetype cpp nnoremap <F5> :w! <bar> exec '!clcpp '.shellescape('%')<CR>
    
  • 相关阅读:
    js中两个==和三个===的区别
    软件需求工程解析
    《我们应当怎样做需求分析》阅读笔记
    需求工程阅读笔记03
    个人小软件冲刺05
    个人小软件冲刺04
    需求工程阅读笔记02
    个人小软件冲刺03
    个人小软件冲刺02
    个人小软件冲刺01
  • 原文地址:https://www.cnblogs.com/otfsenter/p/7728897.html
Copyright © 2011-2022 走看看