<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Thanks Brain. Got ESL.so, however on my Mac it is #include <ruby.h> instead of <ruby/ruby.h>.</div><div><br></div><div>But it can't find the ESL when I require 'ESL' in ruby. Even I put ESL.so in one of the dir of $:</div><div><br></div><div>Any clue for me?</div><div><br></div><div>seven@du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/esl$ make rubymod</div><div>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</div><div>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</div><div>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</div><div>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</div><div>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</div><div>ar rcs libesl.a src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o src/esl_oop.o</div><div>ranlib libesl.a</div><div>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</div><div>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</div><div>g++ -dynamiclib -Xlinker -x esl_wrap.o ../libesl.a -lruby -framework Ruby -o ESL.so -L. </div><div>seven@du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/esl$ cd ruby/</div><div>seven@du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/esl/ruby$ ruby single_command.rb </div><div>single_command.rb:3:in `require': no such file to load -- ESL (LoadError)</div><div> from single_command.rb:3</div><div><div>seven@du-sevens-mac-pro:~/workspace/test/freeswitch/oldtrunk/libs/esl/ruby$ irb</div><div>irb(main):001:0> $:</div><div>=> ["/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", "."]</div><div>irb(main):002:0> </div></div><div><html>On May 26, 2009, at 11:27 PM, Brian West wrote:</html><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The makefile will have to be changed to work with OS X since the linking is done differently.<div><br></div><div>It would be very similar to this one <a href="http://www.bkw.org/esl.imac.diff">http://www.bkw.org/esl.imac.diff</a></div><div><br></div><div>Below will get it to compile:</div><div><br></div><div><div>imac:esl brian$ svn diff</div><div>Index: ruby/Makefile</div><div>===================================================================</div><div>--- ruby/Makefile<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 13432)</div><div>+++ ruby/Makefile<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)</div><div>@@ -1,6 +1,7 @@</div><div> ## no idea how to simply ask ruby which one to use</div><div> LOCAL_CFLAGS=-I$(shell ruby -e 'require "rbconfig"; puts RbConfig::CONFIG["topdir"]')</div><div> LOCAL_LDFLAGS=$(shell ruby -e 'require "rbconfig"; puts RbConfig::CONFIG["LIBRUBYARG"]')</div><div>+LOCAL_LDFLAGS += -framework Ruby</div><div> </div><div> all: ESL.so</div><div> </div><div>Index: ruby/esl_wrap.cpp</div><div>===================================================================</div><div>--- ruby/esl_wrap.cpp<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 13432)</div><div>+++ ruby/esl_wrap.cpp<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)</div><div>@@ -823,7 +823,7 @@</div><div> </div><div> </div><div> </div><div>-#include <ruby.h></div><div>+#include <ruby/ruby.h></div><div> </div><div> /* Remove global macros defined in Ruby's win32.h */</div><div> #ifdef write</div><div>Index: Makefile</div><div>===================================================================</div><div>--- Makefile<span class="Apple-tab-span" style="white-space:pre">        </span>(revision 13432)</div><div>+++ Makefile<span class="Apple-tab-span" style="white-space:pre">        </span>(working copy)</div><div>@@ -12,7 +12,7 @@</div><div> OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o</div><div> SRC=src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp</div><div> HEADERS=src/include/esl_config.h src/include/esl_event.h src/include/esl.h src/include/esl_threadmutex.h src/include/esl_oop.h</div><div>-SOLINK=-shared -Xlinker -x</div><div>+SOLINK=-dynamiclib -Xlinker -x</div><div> # comment the next line to disable c++ (no swig mods for you then)</div><div> OBJS += src/esl_oop.o</div><div> </div><div><br></div><div><br></div><div>/b</div><div><br></div></div><div><br></div><div><br><div><div>On May 26, 2009, at 10:22 AM, dujinfang wrote:</div><div><br></div><blockquote type="cite"><span class="Apple-style-span" style="color: rgb(0, 0, 0); ">Hi,<br><br>Following the wiki:<span class="Apple-converted-space"> </span><a href="http://wiki.freeswitch.org/wiki/Event_Socket_Library">http://wiki.freeswitch.org/wiki/Event_Socket_Library</a><br>On MacOSX 10.5, I can't get ESL for ruby work. make throws error:<br><br>sevens-mac-pro:~/workspace/test/freeswitch/trunk/libs/esl$ make rubymod<br>make MYLIB="../libesl.a" SOLINK="-shared -Xlinker -x" CFLAGS="-I/Users/<span class="Apple-converted-space"> </span><br>seven/workspace/test/freeswitch/trunk/libs/esl/src/include -<span class="Apple-converted-space"> </span><br>DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2 -ffast-<span class="Apple-converted-space"> </span><br>math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-<span class="Apple-converted-space"> </span><br>prototypes -Wmissing-prototypes" CXXFLAGS="-I/Users/seven/workspace/<span class="Apple-converted-space"> </span><br>test/freeswitch/trunk/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -<span class="Apple-converted-space"> </span><br>I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-variable" <br>CXX_CFLAGS="" -C ruby<br>g++ -I/Users/seven/workspace/test/freeswitch/trunk/libs/esl/src/<span class="Apple-converted-space"> </span><br>include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -Wall <br>-Werror -Wno-unused-variable -I/opt/local/lib/ruby/1.8/i686-darwin9 -c <br>esl_wrap.cpp -o esl_wrap.o<br>g++ -shared -Xlinker -x esl_wrap.o ../libesl.a -lruby -o ESL.so -L.<br>Undefined symbols:<br> "_main", referenced from:<br> start in crt1.10.5.o<br>ld: symbol(s) not found<br>collect2: ld returned 1 exit status<br>make[1]: *** [ESL.so] Error 1<br><br>Thanks for any help.</span></blockquote></div><br><div apple-content-edited="true"> <span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Brian West</div><div><a href="mailto:brian@freeswitch.org">brian@freeswitch.org</a></div><div><br></div></div></span>-- Meet us at ClueCon! <a href="http://www.cluecon.com/">http://www.cluecon.com</a><br><div><br></div></div></span><br class="Apple-interchange-newline"></div></span><br class="Apple-interchange-newline"> </div><br></div></div>_______________________________________________<br>Freeswitch-users mailing list<br><a href="mailto:Freeswitch-users@lists.freeswitch.org">Freeswitch-users@lists.freeswitch.org</a><br>http://lists.freeswitch.org/mailman/listinfo/freeswitch-users<br>UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-users<br>http://www.freeswitch.org<br></blockquote></div><br></body></html>