[Freeswitch-users] how to enable ESL for ruby?
Brian West
brian at freeswitch.org
Tue May 26 09:27:43 PDT 2009
On May 26, 2009, at 11:20 AM, dujinfang wrote:
> Thanks Brain. Got ESL.so, however on my Mac it is #include <ruby.h>
> instead of <ruby/ruby.h>.
Actually since we do -framework Ruby it should be ruby/ruby but I
think the line above the -framework Ruby should be removed since
you're doing i tthe Mac way.
/b
>
> But it can't find the ESL when I require 'ESL' in ruby. Even I put
> ESL.so in one of the dir of $:
>
> Any clue for me?
>
> seven at du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/esl
> $ make rubymod
> cc -I/Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/
> include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2
> -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-
> prototypes -Wmissing-prototypes -c src/esl.c -o src/esl.o
> cc -I/Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/
> include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2
> -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-
> prototypes -Wmissing-prototypes -c src/esl_event.c -o src/esl_event.o
> cc -I/Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/
> include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2
> -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-
> prototypes -Wmissing-prototypes -c src/esl_threadmutex.c -o src/
> esl_threadmutex.o
> cc -I/Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/
> include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2
> -ffast-math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-
> prototypes -Wmissing-prototypes -c src/esl_config.c -o src/
> esl_config.o
> g++ -I/Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/
> include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -
> Wall -Werror -Wno-unused-variable -c src/esl_oop.cpp -o src/esl_oop.o
> ar rcs libesl.a src/esl.o src/esl_event.o src/esl_threadmutex.o src/
> esl_config.o src/esl_oop.o
> ranlib libesl.a
> make MYLIB="../libesl.a" SOLINK="-dynamiclib -Xlinker -x" CFLAGS="-I/
> Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/include -
> DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2 -ffast-
> math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-
> prototypes -Wmissing-prototypes" CXXFLAGS="-I/Users/seven/workspace/
> test/freeswitch/oldtrunk/libs/esl/src/include -DHAVE_EDITLINE -g -
> ggdb -I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-
> variable" CXX_CFLAGS="" -C ruby
> g++ -I/Users/seven/workspace/test/freeswitch/oldtrunk/libs/esl/src/
> include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -
> Wall -Werror -Wno-unused-variable -I/opt/local/lib/ruby/1.8/i686-
> darwin9 -c esl_wrap.cpp -o esl_wrap.o
> g++ -dynamiclib -Xlinker -x esl_wrap.o ../libesl.a -lruby -framework
> Ruby -o ESL.so -L.
> seven at du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/esl
> $ cd ruby/
> seven at du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/
> esl/ruby$ ruby single_command.rb
> single_command.rb:3:in `require': no such file to load -- ESL
> (LoadError)
> from single_command.rb:3
> seven at du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/
> esl/ruby$ irb
> irb(main):001:0> $:
> => ["/opt/local/lib/ruby/site_ruby/1.8", "/opt/local/lib/ruby/
> site_ruby/1.8/i686-darwin9", "/opt/local/lib/ruby/site_ruby", "/opt/
> local/lib/ruby/vendor_ruby/1.8", "/opt/local/lib/ruby/vendor_ruby/
> 1.8/i686-darwin9", "/opt/local/lib/ruby/vendor_ruby", "/opt/local/
> lib/ruby/1.8", "/opt/local/lib/ruby/1.8/i686-darwin9", "."]
> irb(main):002:0>
Brian West
brian at freeswitch.org
-- Meet us at ClueCon! http://www.cluecon.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-users/attachments/20090526/baf6dad7/attachment-0002.html
More information about the FreeSWITCH-users
mailing list