<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 &lt;ruby.h> instead of &lt;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 &nbsp;-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 &nbsp;-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 &nbsp;-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 &nbsp;-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++ &nbsp;-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++ &nbsp;-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.&nbsp;</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&nbsp;</div><div>single_command.rb:3:in `require': no such file to load -- ESL (LoadError)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;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>&nbsp;</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&nbsp;<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>&nbsp;## no idea how to simply ask ruby which one to use</div><div>&nbsp;LOCAL_CFLAGS=-I$(shell ruby -e 'require "rbconfig"; puts RbConfig::CONFIG["topdir"]')</div><div>&nbsp;LOCAL_LDFLAGS=$(shell ruby -e 'require "rbconfig"; puts RbConfig::CONFIG["LIBRUBYARG"]')</div><div>+LOCAL_LDFLAGS += -framework Ruby</div><div>&nbsp;</div><div>&nbsp;all: ESL.so</div><div>&nbsp;</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>&nbsp;</div><div>&nbsp;</div><div>&nbsp;</div><div>-#include &lt;ruby.h></div><div>+#include &lt;ruby/ruby.h></div><div>&nbsp;</div><div>&nbsp;/* Remove global macros defined in Ruby's win32.h */</div><div>&nbsp;#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>&nbsp;OBJS=src/esl.o src/esl_event.o src/esl_threadmutex.o src/esl_config.o</div><div>&nbsp;SRC=src/esl.c src/esl_event.c src/esl_threadmutex.c src/esl_config.c src/esl_oop.cpp</div><div>&nbsp;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>&nbsp;# comment the next line to disable c++ (no swig mods for you then)</div><div>&nbsp;OBJS += src/esl_oop.o</div><div>&nbsp;</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">&nbsp;</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">&nbsp;</span><br>seven/workspace/test/freeswitch/trunk/libs/esl/src/include -<span class="Apple-converted-space">&nbsp;</span><br>DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -O2 -ffast-<span class="Apple-converted-space">&nbsp;</span><br>math -Wall -Werror -Wunused-variable -Wwrite-strings -Wstrict-<span class="Apple-converted-space">&nbsp;</span><br>prototypes -Wmissing-prototypes" CXXFLAGS="-I/Users/seven/workspace/<span class="Apple-converted-space">&nbsp;</span><br>test/freeswitch/trunk/libs/esl/src/include -DHAVE_EDITLINE -g -ggdb -<span class="Apple-converted-space">&nbsp;</span><br>I../../libs/libedit/src/ -fPIC -Wall -Werror -Wno-unused-variable" &nbsp;<br>CXX_CFLAGS="" -C ruby<br>g++ &nbsp;-I/Users/seven/workspace/test/freeswitch/trunk/libs/esl/src/<span class="Apple-converted-space">&nbsp;</span><br>include -DHAVE_EDITLINE -g -ggdb -I../../libs/libedit/src/ -fPIC -Wall &nbsp;<br>-Werror -Wno-unused-variable -I/opt/local/lib/ruby/1.8/i686-darwin9 -c &nbsp;<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>&nbsp;&nbsp;"_main", referenced from:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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! &nbsp;<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>