[Home] [Downloads] [Search] [Help/forum]

Gammon Forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  Programming
. -> [Folder]  General
. . -> [Subject]  Coding Question
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Coding Question
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  

Posted by DemiGod   (22 posts)  [Biography] bio
Date Thu 19 Mar 2009 04:54 AM (UTC)  quote  ]
Message
ugh.. found the answer for anyone else that has this issue in the future:

http://www.smaugmuds.org/index.php?a=topic&t=3772&p=15641

"When you have it all working and the code compiled and running, you can connect to the running server vie any client in windows using the IP 192.168.11.150 and whatever port your using."

Demi Out
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Thu 19 Mar 2009 04:30 AM (UTC)  quote  ]
Message
Unfortunately I found no remedy to my problem with cygwin.

If anyone does come up with a solution for this though, please let me know.
[Go to top] top

Posted by Nick Gammon   Australia  (19,672 posts)  [Biography] bio   Forum Administrator
Date Thu 19 Mar 2009 04:06 AM (UTC)  quote  ]
Message
I can't comment about andlinux, you seem to be doing the right thing. It certainly works under Cygwin.

I would use Cygwin myself, and resolve the errors. Switching to andlinux seems to me to have replaced one problem with another one.

Possibly the Windows firewall is blocking incoming connections to andlinux.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Thu 19 Mar 2009 02:29 AM (UTC)  quote  ]

Amended on Thu 19 Mar 2009 04:25 AM (UTC) by DemiGod

Message
Ok i think I am actually compiling this thing alright now..

I have the executable but I simply can not connect:

Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 3310 1.4 2.1 8904 5460 pts/0 S+ 22:25 0:04 ../src/smaug 4000
root 3324 0.0 0.2 1672 520 pts/1 R+ 22:29 0:00 grep smaug

I am using localhost instead of 127.0.0.1 on port 4000.

No connection. Any ideas guys? I don't see why getting this to work 'out of the box' is becoming such a task.

[edit: does it matter that I am behind a router? Does andLinux see itself under some other network?]
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Thu 19 Mar 2009 12:35 AM (UTC)  quote  ]

Amended on Thu 19 Mar 2009 02:28 AM (UTC) by DemiGod

Message
[root@andLinux ~]# ps -waux | grep smaug
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
root 3869 5.0 2.1 8900 5440 pts/0 S+ 20:31 0:01 ../src/smaug
root 3878 0.0 0.2 1668 516 pts/1 R+ 20:32 0:00 grep smaug

I have in fact read your compiling overview when I started out using cygwin, but i was receiving errors exactly matching those of the following thread:

http://www.gammon.com.au/forum/bbshowpost.php?id=8841

So I moved researched and found no answers. I moved on and decided to use andLinux. After installing and messing with it, the 'make' command didn't even work without downloading g++ which I don't see why I need since this is C and not C++.

Anyhow, I installed that g++ add-on and started playing with make. I don't know if I'm just missing libraries or requisite add-ons that I need to compile correctly but somehow I can't get a good compile.

When I use the gcc commands I get a huge list of errors. Using make, I can make the .o files from the corresponding .c files but no executable comes with it [edit: the smaug executable is in fact created when i 'make smaug'].

And yes, the files, after inputing 'ls -l" are years old - at least most are. Some are of today's date, including smaug. However, the .o files I created are of the correct date [today].

[edit] Do i have to make any changes to the makefile depending on what programs I use? I noticed some things are commented when it says 'uncomment if using cygwin' for example, which I never bothered to look at.
[Go to top] top

Posted by Nick Gammon   Australia  (19,672 posts)  [Biography] bio   Forum Administrator
Date Wed 18 Mar 2009 10:08 PM (UTC)  quote  ]

Amended on Wed 18 Mar 2009 10:09 PM (UTC) by Nick Gammon

Message
For help on compiling, see my own notes on that:

http://www.mushclient.com/compiling

The command "ps" shows which processes are running, you type that from a command prompt. To narrow it down, you could type:


ps -waux  | grep smaug


That would show processes with smaug in the name.

Quote:

is this 'smaug' file that I am running something that came with the code i downloaded or did I actually compile this


From the command prompt, type "ls -l". Does the date/time on the smaug file agree with when you compiled it, or is it years old? (that is -L in lower case, not the number "one").

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Wed 18 Mar 2009 07:22 PM (UTC)  quote  ]

Amended on Thu 19 Mar 2009 12:31 AM (UTC) by DemiGod

Message
ps?

I am using mushclient, but telnet doesn't work either.

here's the end of the command:

Tue Mar 18 15:11:55 2008 :: Initializing socket
Tue Mar 18 15:11:55 2008 :: IMC: Loading IMC2 command table...
Tue Mar 18 15:11:55 2008 :: IMC: Loading IMC2 network data...
Tue Mar 18 15:11:55 2008 :: IMC: Loading IMC2 help file...
Tue Mar 18 15:11:55 2008 :: IMC: Loading IMC2 color table...
Tue Mar 18 15:11:55 2008 :: IMC: Loading IMC2 who template...
Tue Mar 18 15:11:55 2008 :: IMC: imcfread_word: EOF encountered on read.
Tue Mar 18 15:11:55 2008 :: IMC: IMC2 network data loaded. Autoconnect not set. IMC2 will need to be connected manually.
Tue Mar 18 15:11:55 2008 :: (Name Not Set) ready on port 4000.


also, is this 'smaug' file that I am running something that came with the code i downloaded or did I actually compile this? I ask because once i change some code, i want to know if i will be back to square one with all these compiling issues.

I found one decent article about compiling but it doesn't really help me too much and I can't find anything else.

http://www.network-theory.co.uk/docs/gccintro/gccintro_14.html
[Go to top] top

Posted by Zeno   USA  (2,871 posts)  [Biography] bio   Moderator
Date Wed 18 Mar 2009 07:17 PM (UTC)  quote  ]
Message
Did you verify it was running with ps?

You're connecting via telnet localhost?

Zeno McDohl,
Owner of Bleached InuYasha Galaxy
http://www.biyg.org
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Wed 18 Mar 2009 06:28 PM (UTC)  quote  ]
Message
Alright I tried running 'smaug' which seemed to load the server but I can not connect to it.

When i ran this in cygwin i could connect without a problem, but now with andlinux I can't seem to connect. The connection is refused.
[Go to top] top

Posted by Nick Cash   USA  (626 posts)  [Biography] bio
Date Wed 18 Mar 2009 06:23 PM (UTC)  quote  ]

Amended on Wed 18 Mar 2009 06:24 PM (UTC) by Nick Cash

Message
If you ran the Makefile it should have produced an executable for you. Try running the default startup script and see what happens. The default binary should be named 'smaug' if I recall correctly.

~Nick Cash
http://www.nick-cash.com
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Wed 18 Mar 2009 02:57 PM (UTC)  quote  ]

Amended on Wed 18 Mar 2009 06:27 PM (UTC) by DemiGod

Message
It is the 1.9 version from this site, without any changes made.

Ok thanks for the help guys. I needed to install the g++ package. I'll let you know if I have more trouble.

One note, with g++ the source compiled into .o files from the .c. Is there another step to producing the executable?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Wed 18 Mar 2009 02:51 PM (UTC)  quote  ]
Message
Yes, that is the most current, I just wasn't sure if it was what you were using. (usually the first thing to say in a question like this is what codebase/version you're using, where you got it, etc.)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Wed 18 Mar 2009 02:37 PM (UTC)  quote  ]

Amended on Wed 18 Mar 2009 02:57 PM (UTC) by DemiGod

Message
is the 1.9 download from Nick's download area not the most current? I'll post a log of the errors in a bit.

[root@andLinux src]# make
make -s smaug
Compiling o/imc.o....
make[1]: g++: Command not found
make[1]: *** [o/imc.o] Error 127
make: *** [all] Error 2
[root@andLinux src]#

am I missing some parts of andlinux that I need or do i have to go about this differently?

When i used the gcc compiler [i.e. gcc -Wall act_move.c... etc] i got many other kinds of errors. Which way is the correct way to use andlinux?
[Go to top] top

Posted by David Haley   USA  (3,881 posts)  [Biography] bio   Moderator
Date Wed 18 Mar 2009 01:20 PM (UTC)  quote  ]
Message
It's fairly likely that the compilation errors are coming from the code itself, not from the environment (AndLinux vs. Cygwin vs. ...)

If you're using a SMAUG base, or an older FUSS base, it's likely that you're getting the (in)famous constness errors. My suggestion would be to upgrade to the latest version of SmaugFUSS -- it's technically better than vanilla SMAUG anyhow.

As for your question, Nick is right, you can probably put it wherever it makes sense to you, but you'll have to hook into the standard mechanisms. For instance you'll need to add your new do_function to the skill table, and create your skill using the OLC commands.

If you're messing with skills, it's usually better to not play many games with renaming existing skills since they could be referenced in area files, for example. It's easiest to create new ones, and then just disable the old ones from the OLC commands.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
[Go to top] top

Posted by DemiGod   (22 posts)  [Biography] bio
Date Wed 18 Mar 2009 02:44 AM (UTC)  quote  ]
Message
Maybe I can add this side question here as well..

i can't find and sources on using andlinux, but cygwin just wasn't working for me. I was having the same errors come up as the other post by dbaker that had to do with none of the commands working in game.

I decided to install andlinux. Does anyone have experience with smaug and andlinux? For the life of me, I can't find any good information on how to go about compiling this code. I just get errors upon errors.

- Demi
[Go to top] 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.


8,089 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]