<html><body 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&gt;</div><div>+#include &lt;ruby/ruby.h&gt;</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></body></html>