<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Thanks for the advice!<br>
<br>
I tried it but still got the same error. <br>
<br>
I added the #include <apr_general.h> and found it from
/usr/local/sr/freeswitch/libs/apr/include<br>
rather than from the installed directory /usr/local/freeswitch. Hope
it is the right one.<br>
<br>
any more clues?<br>
<br>
<br>
On 22/11/11 01:38, Anthony Minessale wrote:
<blockquote
cite="mid:CAKbxfG9g699x8RqTNnaQDdr6FHsHoei26Xqa3hEBh2NG6WXmmA@mail.gmail.com"
type="cite">try
<div><br>
</div>
<div>
<div> if (apr_initialize() != SWITCH_STATUS_SUCCESS) {</div>
<div> fprintf(stderr, "FATAL ERROR! Could not initialize
APR\n");</div>
<div> return 255;</div>
<div> }</div>
<div>
<br>
</div>
<div>early on in main()</div>
<div><br>
</div>
<br>
<div class="gmail_quote">On Mon, Nov 21, 2011 at 1:12 PM, xl127
<span dir="ltr"><<a moz-do-not-send="true"
href="mailto:x.liu@hw.ac.uk">x.liu@hw.ac.uk</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello,<br>
<br>
Following the instructions in<br>
<a moz-do-not-send="true"
href="http://wiki.freeswitch.org/wiki/Embedding_FreeSWITCH"
target="_blank">http://wiki.freeswitch.org/wiki/Embedding_FreeSWITCH</a><br>
I am trying to use Embedded FreeSwitch.<br>
<br>
I installed FS in Fedora linux as a root user in
/usr/local/freeswitch.<br>
Now as non-root user,<br>
I compiled following codes:<br>
<br>
#include <switch.h><br>
int main(int argc, char** argv)<br>
{<br>
switch_core_flag_t flags = SCF_USE_SQL;<br>
bool console = true;<br>
const char *err = NULL;<br>
switch_core_set_globals();<br>
switch_core_init_and_modload(flags, console ?
SWITCH_TRUE :<br>
SWITCH_FALSE, &err);<br>
switch_core_runtime_loop(!console);<br>
return 0;<br>
}<br>
<br>
And copy the executable and conf, mod, contents of lib of
the installed<br>
FS to my $MyWorkingDir.<br>
<br>
My directory structure looks like:<br>
MyWorkingDir--bin/ (contains my executable: FS_Embed)<br>
--conf/<br>
--mod/<br>
--lib/<br>
--grammars<br>
--sounds<br>
--scripts<br>
--log<br>
(I also tried to copy the contents of lib directory into
MyWorkingDir)<br>
<br>
When I run my embedded FS: ./FS_Embed, I got error<br>
<br>
2011-11-21 18:46:26.606783 [INFO] switch_event.c:631
Activate Eventing<br>
Engine.<br>
2011-11-21 18:46:26.617941 [DEBUG] switch_event.c:610 Create
event<br>
dispatch thread 0<br>
FS_Embed: src/switch_xml.c:2225: switch_xml_open_cfg:
Assertion<br>
`MAIN_XML_ROOT != ((void *)0)' failed.<br>
Aborted (core dumped)<br>
<br>
and occasionally on another run, I got error:<br>
<br>
2011-11-21 16:56:51.756040 [INFO] switch_event.c:631
Activate Eventing<br>
Engine.<br>
2011-11-21 16:56:51.767198 [DEBUG] switch_event.c:610 Create
event<br>
dispatch thread 0<br>
Segmentation fault (core dumped)<br>
<br>
It looks like there are some things wrong with my
Environment Setup for<br>
Embedded FS,<br>
but after a while of checking/trying/googling I couldn't
find what's wrong.<br>
<br>
Any advice please?<br>
<br>
Many thanks!<br>
Xing<br>
<br>
<br>
<br>
--<br>
Heriot-Watt University is a Scottish charity<br>
registered under charity number SC000278.<br>
<br>
Heriot-Watt University is the Sunday Times<br>
Scottish University of the Year 2011-2012<br>
<br>
<br>
<br>
_________________________________________________________________________<br>
Professional FreeSWITCH Consulting Services:<br>
<a moz-do-not-send="true"
href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://www.freeswitchsolutions.com" target="_blank">http://www.freeswitchsolutions.com</a><br>
<br>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server<br>
<a moz-do-not-send="true" href="http://www.cudatel.com"
target="_blank">http://www.cudatel.com</a><br>
<br>
Official FreeSWITCH Sites<br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://wiki.freeswitch.org"
target="_blank">http://wiki.freeswitch.org</a><br>
<a moz-do-not-send="true" href="http://www.cluecon.com"
target="_blank">http://www.cluecon.com</a><br>
<br>
FreeSWITCH-users mailing list<br>
<a moz-do-not-send="true"
href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a><br>
UNSUBSCRIBE:<a moz-do-not-send="true"
href="http://lists.freeswitch.org/mailman/options/freeswitch-users"
target="_blank">http://lists.freeswitch.org/mailman/options/freeswitch-users</a><br>
<a moz-do-not-send="true" href="http://www.freeswitch.org"
target="_blank">http://www.freeswitch.org</a><br>
</blockquote>
</div>
<br>
<br clear="all">
<div><br>
</div>
-- <br>
Anthony Minessale II<br>
<br>
FreeSWITCH <a moz-do-not-send="true"
href="http://www.freeswitch.org/">http://www.freeswitch.org/</a><br>
ClueCon <a moz-do-not-send="true"
href="http://www.cluecon.com/">http://www.cluecon.com/</a><br>
Twitter: <a moz-do-not-send="true"
href="http://twitter.com/FreeSWITCH_wire">http://twitter.com/FreeSWITCH_wire</a><br>
<br>
AIM: anthm<br>
<a moz-do-not-send="true"
href="mailto:MSN%3Aanthony_minessale@hotmail.com">MSN:anthony_minessale@hotmail.com</a><br>
GTALK/JABBER/<a moz-do-not-send="true"
href="mailto:PAYPAL%3Aanthony.minessale@gmail.com">PAYPAL:anthony.minessale@gmail.com</a><br>
IRC: <a moz-do-not-send="true" href="http://irc.freenode.net">irc.freenode.net</a>
#freeswitch<br>
<br>
FreeSWITCH Developer Conference<br>
<a moz-do-not-send="true"
href="mailto:sip%3A888@conference.freeswitch.org">sip:888@conference.freeswitch.org</a><br>
<a moz-do-not-send="true"
href="mailto:googletalk%3Aconf%2B888@conference.freeswitch.org">googletalk:conf+888@conference.freeswitch.org</a><br>
pstn:+19193869900<br>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_________________________________________________________________________
Professional FreeSWITCH Consulting Services:
<a class="moz-txt-link-abbreviated" href="mailto:consulting@freeswitch.org">consulting@freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitchsolutions.com">http://www.freeswitchsolutions.com</a>
FreeSWITCH-powered IP PBX: The CudaTel Communication Server
<a class="moz-txt-link-freetext" href="http://www.cudatel.com">http://www.cudatel.com</a>
Official FreeSWITCH Sites
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://wiki.freeswitch.org">http://wiki.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://www.cluecon.com">http://www.cluecon.com</a>
FreeSWITCH-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:FreeSWITCH-users@lists.freeswitch.org">FreeSWITCH-users@lists.freeswitch.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/listinfo/freeswitch-users">http://lists.freeswitch.org/mailman/listinfo/freeswitch-users</a>
UNSUBSCRIBE:<a class="moz-txt-link-freetext" href="http://lists.freeswitch.org/mailman/options/freeswitch-users">http://lists.freeswitch.org/mailman/options/freeswitch-users</a>
<a class="moz-txt-link-freetext" href="http://www.freeswitch.org">http://www.freeswitch.org</a>
</pre>
</blockquote>
<br>
<br>
<hr>
<br>
<img src="cid:hw_uni_of_year.jpg" align=left
alt="MailScanner Signature HW">
<font face="arial,helvetica">
<b>Heriot-Watt University is the Sunday Times<br>
Scottish University of the Year 2011-2012</b>
</font>
<br><br>
<font face="arial,helvetica" size="-1">
Heriot-Watt University is a Scottish charity<br>
registered under charity number SC000278.
<br>
</font>
</body>
</html>