<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 <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></body></html>