Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.
 Entire forum ➜ SMAUG ➜ Lua ➜ How to add Lua scripting to SMAUG

How to add Lua scripting to SMAUG

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1  2  3  4  5  6 

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #75 on Mon 01 Oct 2007 04:25 AM (UTC)
Message
Is FotE done in C++ (rather than C?).

If so, that would explain the missing references. You will need to put extern "C" around your .h files. I am not at my usual PC right now, but it will look something like this:


extern "C"  {
#include "lua.h"
// other Lua includes
}


- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Keberus   (31 posts)  Bio
Date Reply #76 on Mon 01 Oct 2007 09:26 AM (UTC)
Message
You were right on the money. Btw regular FotE isn't compiled with C++ but a while back I started using the C++ compiler instead of the C one. Thanks for the help, I looked over the code probably 30 times before posting and couldn't figure it out for the life of me. Never would have thought that the problem was with me using the C++ compiler.

Thanks Again,
KeB
Top

Posted by 6D STAFF   (1 post)  Bio
Date Reply #77 on Wed 25 Jun 2008 11:05 AM (UTC)
Message
6 Dragons mud is now using Lua Code....

THANKS NICK!!!

http://6dragons.org
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #78 on Thu 26 Jun 2008 01:04 AM (UTC)
Message
Glad you like it!

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Orik   USA  (182 posts)  Bio
Date Reply #79 on Sat 19 Jul 2008 07:17 PM (UTC)

Amended on Sat 19 Jul 2008 07:44 PM (UTC) by Orik

Message
ok. I've been having a problem with the undefined references as well. Here is the errors.


make -s smaug
/***/baklua/lib/liblua.a(ldebug.o)(.text+0x92f): In function `luaG_runerror':
: undefined reference to `__stack_chk_fail'
/***/baklua/lib/liblua.a(ldo.o)(.text+0x51d): In function `luaD_callhook':
: undefined reference to `__stack_chk_fail'
/***/baklua/lib/liblua.a(ldump.o)(.text+0x3f0): In function `luaU_dump':
: undefined reference to `__stack_chk_fail'
/***/baklua/lib/liblua.a(lobject.o)(.text+0x68c): In function `luaO_pushvfstring':
: undefined reference to `__stack_chk_fail'
/***/baklua/lib/liblua.a(lundump.o)(.text+0x74d): In function `luaU_undump':
: undefined reference to `__stack_chk_fail'
/***/baklua/lib/liblua.a(lvm.o)(.text+0x82a): more undefined references to `__stack_chk_fail' follow


I have lua local on my server. do I need to change something in ldo.c, ldump.c and so on? or is it something in my actual smaug src files?


******************EDIT*******************
Turns out it was a lua issue so I just reinstalled lua locally and it worked.
Top

Posted by Wjmurdick   (13 posts)  Bio
Date Reply #80 on Wed 04 Apr 2012 04:59 PM (UTC)
Message
Thread rezzing here, but I wanted to ask if you had a version of SmaugFuss 1.9 with Lua already integrated?
Top

Posted by Nick Gammon   Australia  (23,120 posts)  Bio   Forum Administrator
Date Reply #81 on Thu 05 Apr 2012 12:47 AM (UTC)
Message
I don't think so, this thread is about 5 years old and the source is probably 2 PCs back, plus I wouldn't be sure what other changes I made.

But if you download the linked files and do a bit of fiddling around it should be possible to get it working.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


245,818 views.

This is page 6, subject is 6 pages long:  [Previous page]  1  2  3  4  5  6 

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.