也许很多人碰上过, 用example1_lid:start()会碰上如下错误:
** exited: {error,could_not_load_driver} **
用gdb跟了一下, 发现其实load driver是没有问题, 问题出在load driver之后的版本匹配,
driver_incorrect_version.
解决办法很简单,两步:
1. 把example1_lid.c中的
#include "erl_driver.h" 改成
#include <<erl_driver.h>erl_driver.h><erl_driver.h><erl_driver.h></erl_driver.h></erl_driver.h></erl_driver.h><erl_driver.h><erl_driver.h>
2. 然后把Makefile中的
gcc -o example1_drv.so -fpic -shared example1.c example1_lid.c
这一行改成:
gcc -I/usr/local/lib/erlang/usr/include -o example1_drv.so -fpic -shared example1.c example1_lid.c
做完这两步就可以啦.
make之后试试就没问题.</erl_driver.h></erl_driver.h><erl_driver.h><erl_driver.h></erl_driver.h></erl_driver.h>
分享到:
相关推荐
programming erlang 源码
Programming Erlang
Programming+Erlang.pdf+ 面对软件错误构建可靠的分布式系统.pdf+ Concurrent Programming in ERLANG
In this second edition of the bestselling Programming Erlang, you'll learn how to write parallel programs that scale effortlessly on multicore systems. Using Erlang, you'll be surprised at how easy ...
Programming Erlang 官方文档
Joe Armsrong经典2013首发,Programming Erlang second edition
Pragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers, LLC. Every precaution was taken in the preparation of this book.
Erlang Programming 导Erlang Programming 导读.pdf读.pdfErlang Programming 导读.pdf
Concurrent Programming in ERLANG
Pragmatic.Programming.Erlang.2nd.Edition
Concurrency is natural in ...The model of programming that Erlang uses is very similar to how the world works. This makes programming easy. Many programmers have discovered this, as have many companies.
erlang port driver test vs project. can run on linux
Pragmatic Programmer,Pragmatic Programming,Pragmatic Bookshelf and the linking g device are trademarks of The Pragmatic Programmers,LLC. Every precaution was taken in the preparation of this book....
Erlang/OTP Application完整例子,含代码和二进制,对于学习Erlang/OTP Application很有帮助。 配套文章http://blog.csdn.net/mycwq/article/details/12610677
这是《 Erlang编程语言》的上一页,我们正在处理中,将那里的所有书籍都转换为新页面。 请再次检查此页面!!!