VS编译python为lib之后,mingw如何调用。

xycode 2012-10-20 01:47:05
每次调用都提示 _imp_Py_Initialize 未定义。。
大概就是编译器不一样,函数名不一样吧? 这个大家有遇到过,并解决过吗?

在windows 下,如何用mingw来编译,搜索了好几天都是VS的编译方法
...全文
190 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
angel_su 2012-10-20
  • 打赏
  • 举报
回复
静态库貌似不行...
xycode 2012-10-20
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 的回复:]

windows下官方编译版有libpythonxx.a这个文件可供mingw链接,自己用vc编译的话就全部都用vc不就得了,非要的话转一个.a库出来,或者直接把pythonxx.lib当.c.o这类参数试试...
[/Quote]

官方编译版,是指libs目录下那些吗? 但是那些还是需要依赖动态链接库,我希望能有个静态库,免除DLL的依赖。
angel_su 2012-10-20
  • 打赏
  • 举报
回复
windows下官方编译版有libpythonxx.a这个文件可供mingw链接,自己用vc编译的话就全部都用vc不就得了,非要的话转一个.a库出来,或者直接把pythonxx.lib当.c.o这类参数试试...
MinGW 编译的 Windows 版 Vim,包含非官方补丁:中文行禁则('encoding' 选项为 UTF-8 时才会生效)。脚本语言支持有:Python 2.7、Python 3.3、Ruby 2.0.0、Lua 5.2(只需要能找到 lua52.dll 文件已经自带 lua52.dll 文件,方便各位使用 neocomplete 插件)。 md5sum: 1acd40c636111e838e0ec20792c04ff3 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 30 2013 23:16:32) MS-Windows 64 位图形界面版本 带 OLE 支持 包含补丁: 1-110 修改者 百合仙子 编译者 百合仙子@次美好的百合森林 巨型版本 带图形界面。 可使用(+)与不可使用(-)的功能: +acl +eval +mouse +syntax +arabic +ex_extra -mouseshape +tag_binary +autocmd +extra_search +multi_byte_ime/dyn +tag_old_static -balloon_eval +farsi +multi_lang -tag_any_white -browse +file_in_path -mzscheme -tcl ++builtin_terms +find_in_path -netbeans_intg -tgetent +byte_offset +float +path_extra -termresponse +cindent +folding -perl +textobjects +clientserver -footer +persistent_undo +title +clipboard +gettext/dyn -postscript -toolbar +cmdline_compl -hangul_input +printer +user_commands +cmdline_hist +iconv/dyn +profile +vertsplit +cmdline_info +insert_expand +python/dyn +virtualedit +comments +jumplist +python3/dyn +visual +conceal +keymap +quickfix +visualextra +cryptv +langmap +reltime +viminfo +cscope +libcall +rightleft +vreplace +cursorbind +linebreak +ruby/dyn +wildignore +cursorshape +lispindent +scrollbind +wildmenu +dialog_con +listcmds +signs +windows +diff +localmap +smartindent +writebackup +digraphs +lua/dyn -sniff -xfontset -dnd +menu +startuptime -xim -ebcdic +mksession +statusline -xterm_save +emacs_tags +modify_fname -sun_workshop -xpm_w32 详情及更新: http://lilydjwg.is-programmer.com/pages/19540.html#win-vim
MinGW 编译的 Windows 版 Vim,包含非官方补丁:中文行禁则('encoding' 选项为 UTF-8 时才会生效)。脚本语言支持有:Python 2.7、Python 3.3、Ruby 2.0.0、Lua 5.2(只需要能找到 lua52.dll 文件已经自带 lua52.dll 文件,方便各位使用 neocomplete 插件)。 md5sum: 2cfd2cbc8048c6b2c5483248e02e7ad0 VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Nov 30 2013 23:16:32) MS-Windows 32 位图形界面版本 带 OLE 支持 包含补丁: 1-110 修改者 百合仙子 编译者 百合仙子@次美好的百合森林 巨型版本 带图形界面。 可使用(+)与不可使用(-)的功能: +acl +eval +mouse +syntax +arabic +ex_extra -mouseshape +tag_binary +autocmd +extra_search +multi_byte_ime/dyn +tag_old_static -balloon_eval +farsi +multi_lang -tag_any_white -browse +file_in_path -mzscheme -tcl ++builtin_terms +find_in_path -netbeans_intg -tgetent +byte_offset +float +path_extra -termresponse +cindent +folding -perl +textobjects +clientserver -footer +persistent_undo +title +clipboard +gettext/dyn -postscript -toolbar +cmdline_compl -hangul_input +printer +user_commands +cmdline_hist +iconv/dyn +profile +vertsplit +cmdline_info +insert_expand +python/dyn +virtualedit +comments +jumplist +python3/dyn +visual +conceal +keymap +quickfix +visualextra +cryptv +langmap +reltime +viminfo +cscope +libcall +rightleft +vreplace +cursorbind +linebreak +ruby/dyn +wildignore +cursorshape +lispindent +scrollbind +wildmenu +dialog_con +listcmds +signs +windows +diff +localmap +smartindent +writebackup +digraphs +lua/dyn -sniff -xfontset -dnd +menu +startuptime -xim -ebcdic +mksession +statusline -xterm_save +emacs_tags +modify_fname -sun_workshop -xpm_w32 详情及更新: http://lilydjwg.is-programmer.com/pages/19540.html#win-vim

37,721

社区成员

发帖
与我相关
我的任务
社区描述
JavaScript,VBScript,AngleScript,ActionScript,Shell,Perl,Ruby,Lua,Tcl,Scala,MaxScript 等脚本语言交流。
社区管理员
  • 脚本语言(Perl/Python)社区
  • IT.BOB
加入社区
  • 近7日
  • 近30日
  • 至今

试试用AI创作助手写篇文章吧