mac vim YouCompleteMe 挂掉问题

macos在vim中安装YouCompleteMe发现,vim提示:YouCompleteMe unavailable: requires Vim 7.3.584+,我了个去,版本太低了,然后用port 安装了一下,sudo port install vim +python27,安装后vim为:

[evil]$vim --version
VIM - Vi IMproved 7.4。

然后编译了YouCompleteMe,后配置vim,结果vim起来挂了。 后来发现,是YouCompleteMe编译得使用python得版本跟vim支持得版本对不上号。vim的python版本为(:下输入python print(sys.version)可以查看vim的python版本 ) :

2.7.8 (default, Jul 13 2014, 17:11:32)
[GCC 4.2.1 Compatible Apple LLVM 5.1 (clang-503.0.40)]
Press ENTER or type command to continue

而shell下的python为2.7.5是mac自带的,也就是YouCompleteMe编译使用的版本。所以用port修改下python的版本选择使用python2.7.8命

python自动获取图片

#!/usr/bin/python
#coding=utf-8
#post by EvilBinary 小E
#Filename: get.py

import urllib,urllib2,cookielib,re,os
import fnmatch,sys,time,random
import time  
import thread
import threading
import hashlib 

cookie=cookielib.CookieJar()

def getUrlContent(url,action):
        try:
                opener=urllib2.build_opener(urllib2.HTTPCookieProcessor(cookie))
                agents = ["Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)","Internet Explorer 7 (Windows Vista); Mozilla/4.0 ","Google Chrome 0.2.149.29 (Windows XP)","Opera 9.25 (Windows Vista)","Mozilla/4.0 (compatible; MSIE 7.0b; Windows NT 5.

lua dynamic libraries not enabled; check your Lua installation

在windows下执行lua程序调用动态库的时候,发现:

D:\My Documents\codeprojec\test_so\bin\Debug>lua.exe look.lua
lua.exe: error loading module ‘stacklook’ from file ‘./stacklook.dll': dynamic libraries not enabled; check your Lua installation
追述原因就是没有编译动态库加载,这样我们修改lua源码文件下的 src/Makefile文件找到ansi 修改成这样:ansi:$(MAKE) all MYCFLAGS=-DLUA_ANSI MYCFLAGS+=-DLUA_USE_DLOPEN MYLIBS=”-ldl”这样可以用mingw编译了。再按编译过成中mingw需要下载个文件http://code.google.com/p/dlfcn-win32/ 这个下载dlfcn-win32-static-r19.tar.bz2 解压到mingw对应的include 和lib路径下。

D:\lua-5.1>.\mingw32-make.exe  ansi
cd src && D:/lua-5.1/mingw32-make ansi
mingw32-make[1]: Entering d