This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

module compilation in current 1.7 branch

Discussion of Eggdrop's code and module programming in C.
Post Reply
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

module compilation in current 1.7 branch

Post by De Kus »

Sympton: You will most likely get following compiler error depending on the module you are triing to compile:

Code: Select all

In file included from gseen.c:98:
seentree.c: In function `tcl_killseen':
seentree.c:202: error: `context' undeclared (first use in this function)
Reason: wcc removed context debugging completly

Solution: go through the source code of the module and remove ALL calls to 'Context;' / 'context;'. After that the module should compile again (except if you still need to adjust the Makefile reflecting changed header filenames).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Re: module compilation in current 1.7 branch

Post by demond »

De Kus wrote: Solution: go through the source code of the module and remove ALL calls to 'Context;' / 'context;'
ever heard of sed? ;)
User avatar
De Kus
Revered One
Posts: 1361
Joined: Sun Dec 15, 2002 11:41 am
Location: Germany

Re: module compilation in current 1.7 branch

Post by De Kus »

demond wrote:ever heard of sed? ;)
read in Mafefile or Configure script, but never really looked what it does and so I have no clue how to filter it out ^-^. But how you remove it, is everyones own decition ;).
De Kus
StarZ|De_Kus, De_Kus or DeKus on IRC
Copyright © 2005-2009 by De Kus - published under The MIT License
Love hurts, love strengthens...
User avatar
demond
Revered One
Posts: 3073
Joined: Sat Jun 12, 2004 9:58 am
Location: San Francisco, CA
Contact:

Post by demond »

that's why you should learn shell scripting :) instead of editing 2537523 files manually, this one-liner could do the job for you:

Code: Select all

find ~/eggdrop1.7.0 -name '*.c' | while read i; do sed -e 's/[Cc]ontext\;//g' $i >tmp && mv tmp $i; done
Post Reply