<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
	<link rel="self" type="application/atom+xml" href="https://forum.eggheads.org/app.php/feed/topic/10152" />

	<title>egghelp/eggheads community</title>
	<subtitle>Discussion of eggdrop bots, shell accounts and tcl scripts.</subtitle>
	<link href="https://forum.eggheads.org/index.php" />
	<updated>2005-07-30T15:05:45-04:00</updated>

	<author><name><![CDATA[egghelp/eggheads community]]></name></author>
	<id>https://forum.eggheads.org/app.php/feed/topic/10152</id>

		<entry>
		<author><name><![CDATA[Galadhrim]]></name></author>
		<updated>2005-07-30T15:05:45-04:00</updated>

		<published>2005-07-30T15:05:45-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53543#p53543</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53543#p53543"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53543#p53543"><![CDATA[
It would be cool to have it all in C++ so you can make 1 class which is your module. That would eliminate alot of worries.<br><br>Obviously it would take a very long time. And I can understand why the chap wants to use C++ as it is the 2nd programming language I learned  and is easier to understand when you know only OO-languages. Still now knowing C my view on C++ has changed quite a bit.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2999">Galadhrim</a> — Sat Jul 30, 2005 3:05 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-30T12:26:53-04:00</updated>

		<published>2005-07-30T12:26:53-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53540#p53540</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53540#p53540"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53540#p53540"><![CDATA[
well obviously the guy's doing this for the sake of learning... it would be a completely different matter if eggdrop was built from the ground up in C++<br><br>C++ has been, is, and will be (at least in the foreseeable future) the programming language of choice for building the most important software products<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Sat Jul 30, 2005 12:26 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Galadhrim]]></name></author>
		<updated>2005-07-30T11:33:23-04:00</updated>

		<published>2005-07-30T11:33:23-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53536#p53536</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53536#p53536"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53536#p53536"><![CDATA[
everything is coded in C would take a real long while to make your C++ module to work with it. Believe me I tried, it doesnt help performance either...<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=2999">Galadhrim</a> — Sat Jul 30, 2005 11:33 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-29T00:03:51-04:00</updated>

		<published>2005-07-29T00:03:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53436#p53436</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53436#p53436"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53436#p53436"><![CDATA[
just out of curiousity, what are you coding in C++ in that module?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Fri Jul 29, 2005 12:03 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-28T04:57:33-04:00</updated>

		<published>2005-07-28T04:57:33-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53414#p53414</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53414#p53414"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53414#p53414"><![CDATA[
Aye! Thx for your help! <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_exclaim.gif" width="15" height="15" alt=":!:" title="Exclamation"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Thu Jul 28, 2005 4:57 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-28T00:31:42-04:00</updated>

		<published>2005-07-28T00:31:42-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53410#p53410</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53410#p53410"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53410#p53410"><![CDATA[
no, you can't bind with spaces, eggdrop splits the server input long before it comes to your bind<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Thu Jul 28, 2005 12:31 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-27T23:35:04-04:00</updated>

		<published>2005-07-27T23:35:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53409#p53409</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53409#p53409"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53409#p53409"><![CDATA[
That's what I initially did, changing CC to g++. Didn't work. But I did not use <strong class="text-strong">ld -Bshareable</strong>. You think it'll "just work" then?<br>Would be nice, but then again I just got it working quite smooth with 2 object files <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br><br>Wouldn't help much anyway cause I only got few functions to share between C and C++.<br><br>Unless there's the posibility to bind commands with spaces:<div class="codebox"><p>Code: </p><pre><code>{"!trigger func1",           "",    (Function) func1,    NULL}{"!trigger func2",           "",    (Function) func2,    NULL}</code></pre></div>But no matter if i escape the space between trigger and func it did not work (yet), only gives me "Ambiguous command.". So I'm about to use one function and parse the input there.<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Wed Jul 27, 2005 11:35 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-27T22:29:47-04:00</updated>

		<published>2005-07-27T22:29:47-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53405#p53405</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53405#p53405"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53405#p53405"><![CDATA[
well the thing is that eggdrop modules import global functions and vars via #define's in module.h which are actually indexes in a global table, so the extern "C" trick doesn't really apply here; besides, from the output you pasted I've got the feeling you somehow messed up your Makefile, you should link with <strong class="text-strong">ld -Bshareable</strong>, not with <em class="text-italics">g++ -o</em>; try to compile woobie.mod, adding some C++ stuff in woobie.c  and making just one change in woobie's original Makefile: add CC=g++<br><br>hmm you are under cygwin... nevermind<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Jul 27, 2005 10:29 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-27T21:10:24-04:00</updated>

		<published>2005-07-27T21:10:24-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53401#p53401</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53401#p53401"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53401#p53401"><![CDATA[
The doc does not say anything about C++ <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>And that already was the exact error:<div class="codebox"><p>Code: </p><pre><code>g++ -o ../../../mymod.dll ../mymod.o -L/usr/local/lib -ltcl8.4 -lm  /usr/lib/binmode.o../../mymod.o: In function `TestCommand'src/mod/mymod/mymod.cpp:54: undefined reference to `_dprintf'</code></pre></div>If you add something like modules.o to your linker you get<div class="codebox"><p>Code: </p><pre><code>../../modules.o: In function `module_load':/devel/eggdrop1.6.17/src/modules.c:791: undefined reference to `_H_load'/devel/eggdrop1.6.17/src/modules.c:791: undefined reference to `_check_tcl_loadunld'../../modules.o: In function `module_unload':/devel/eggdrop1.6.17/src/modules.c:819: undefined reference to `_H_unld'/devel/eggdrop1.6.17/src/modules.c:819: undefined reference to `_check_tcl_loadunld'../../modules.o: In function `add_hook':/devel/eggdrop1.6.17/src/modules.c:1027: undefined reference to `__rfc_ncasecmp'/devel/eggdrop1.6.17/src/modules.c:1026: undefined reference to `__rfc_casecmp'/devel/eggdrop1.6.17/src/modules.c:1028: undefined reference to `__rfc_tolower'/devel/eggdrop1.6.17/src/modules.c:1029: undefined reference to `__rfc_toupper'/devel/eggdrop1.6.17/src/modules.c:1037: undefined reference to `_block_dns_hostbyip'/devel/eggdrop1.6.17/src/modules.c:1041: undefined reference to `_block_dns_ipbyhost'../../modules.o: In function `del_hook':/devel/eggdrop1.6.17/src/modules.c:1100: undefined reference to `_block_dns_hostbyip'/devel/eggdrop1.6.17/src/modules.c:1104: undefined reference to `_block_dns_ipbyhost'...</code></pre></div><br>Seems it is not that easy to have it just compile ALL in C++.<br><br>I worked around that now by compiling the stuff that interacts with eggdrop directly (start, close, command functions) in C.<br>The other stuff i compile in C++ and then just link the stuff to one lib.<br>Seems to work for now.<br>Just need some ugly C functions to pass the input data to the classes *shrug*<br><br><br>Regards<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Wed Jul 27, 2005 9:10 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-27T19:56:41-04:00</updated>

		<published>2005-07-27T19:56:41-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53398#p53398</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53398#p53398"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53398#p53398"><![CDATA[
post the exact error log (using <div class="codebox"><p>Code: </p><pre><code> tag, not [quote]) and RTFM (doc/MODULES)</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Wed Jul 27, 2005 7:56 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-27T18:46:04-04:00</updated>

		<published>2005-07-27T18:46:04-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53395#p53395</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53395#p53395"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53395#p53395"><![CDATA[
Actually that only helped at first glance<blockquote class="uncited"><div>undefined reference to `dprintf(int, char const*, ...)'</div></blockquote>Now i get that error while trying to link <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>If I put a extern "C" around the C include stuff I get "undefined reference to `_dprintf'"<br>Adding modules.o to the linking process gives me a whole list of undefined references <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_sad.gif" width="15" height="15" alt=":(" title="Sad"><br><br>Help pls anyone <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Wed Jul 27, 2005 6:46 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-27T06:40:25-04:00</updated>

		<published>2005-07-27T06:40:25-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53370#p53370</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53370#p53370"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53370#p53370"><![CDATA[
Yeah. Just that i'll have to undecorate the stuff from module.h or something <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad"><br>Anyway if that is the recommended way no problem <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_smile.gif" width="15" height="15" alt=":-)" title="Smile"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Wed Jul 27, 2005 6:40 am</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[demond]]></name></author>
		<updated>2005-07-26T22:49:56-04:00</updated>

		<published>2005-07-26T22:49:56-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53362#p53362</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53362#p53362"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53362#p53362"><![CDATA[
<div class="codebox"><p>Code: </p><pre><code>extern "C" {// your C function prototypes here}</code></pre></div><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=5056">demond</a> — Tue Jul 26, 2005 10:49 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-26T22:40:51-04:00</updated>

		<published>2005-07-26T22:40:51-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53361#p53361</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53361#p53361"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53361#p53361"><![CDATA[
<blockquote class="uncited"><div>#undef  dprintf<br>extern "C" void dprintf(int idx, const char * text, ...);</div></blockquote>After the modules include seems to fix it <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_biggrin.gif" width="15" height="15" alt=":D" title="Very Happy"><br>But guess i'd have to do that for all functions :/<br><br>Is that the correct work-around at all or is there some better way?<p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Tue Jul 26, 2005 10:40 pm</p><hr />
]]></content>
	</entry>
		<entry>
		<author><name><![CDATA[Kappa007]]></name></author>
		<updated>2005-07-26T22:09:36-04:00</updated>

		<published>2005-07-26T22:09:36-04:00</published>
		<id>https://forum.eggheads.org/viewtopic.php?p=53358#p53358</id>
		<link href="https://forum.eggheads.org/viewtopic.php?p=53358#p53358"/>
		<title type="html"><![CDATA[Module in C++]]></title>

		
		<content type="html" xml:base="https://forum.eggheads.org/viewtopic.php?p=53358#p53358"><![CDATA[
Hey all,<br>i was wondering if it is possible to do a module in C++ not in C (i suspect it is - i found one on the web but it's kinda odd <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_mad.gif" width="15" height="15" alt=":x" title="Mad">)<br>I'm getting wicked errors when i try to compile my module in C++....<br>Like dprintf() having too many arguments etc. I suspect it's the scary module.h who is causing that <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><br><br>Anyone got experience with that?<br>Any template/tutorial/help?<br><br><br>Thanks in advance <img class="smilies" src="https://forum.eggheads.org/images/smilies/icon_wink.gif" width="15" height="15" alt=";)" title="Wink"><p>Statistics: Posted by <a href="https://forum.eggheads.org/memberlist.php?mode=viewprofile&amp;u=6524">Kappa007</a> — Tue Jul 26, 2005 10:09 pm</p><hr />
]]></content>
	</entry>
	</feed>
