O folder

Posted by Drene on Tue 11 Apr 2017 08:09 PM — 16 posts, 75,541 views.

#0
I have compiled smaugfuss and it compiled without any error but i suppose there should be .O files in the O folders but i dont see any .o files.

Please is this how it normally is without the .o files or something is wrong

Thanks
Drene
Australia Forum Administrator #1
Which operating system? Are you using Cygwin?
#2
Nick Gammon said:

Which operating system? Are you using Cygwin?

Am usinv win32 and yes i run it with cygwin
USA Global Moderator #3
Quote:
and it compiled without any error

So what's the problem?
#4
Fiendish said:

Quote:
So what's the problem?


i suppose there are meant to be the.o files in the o folders like some files are supposed to change to .o if not all but i cant find any file with .o even in the o folder

2. well i thought it might not be a problem so i continues with the nohup ./startup but it does nohup.out and continues to show a command prompt popping up and immediately close...anything wrong??

please bear with me.


Thanks
Amended on Wed 12 Apr 2017 03:53 PM by Fiendish
USA Global Moderator #5
Object files are an intermediate component of compilation, but they are not needed after compilation is completed.
You said it compiled without error, so they don't need to be there anymore.
Perhaps it didn't compile without error, and you just didn't see the error.
Amended on Wed 12 Apr 2017 03:59 PM by Fiendish
#6
Thanks fiendish, you might be correct or maybe you dont just get me, in a manual i read, i learned that after compiling the src .c files would change into .o although some files might not be converted but in my cases non changed to .o so am asking is it compulsory for it to change to .o and i believeam supposed to have another smaug.exe in the src files....what am i doing wrong
Australia Forum Administrator #7
http://www.gammon.com.au/smaug/howtocompile.htm
USA Global Moderator #8
Drene said:
in a manual i read, i learned that after compiling the src .c files would change into .o

Well, yes. First the compiler takes every source file and converts it into a binary .o file. But then the linker takes all of those .o files and converts them into your final executable. After that you don't need the .o files anymore so they might just be removed.

Quote:
is it compulsory for it to change to .o

In general it is not required. It is possible to go directly from source files to the final executable by doing compilation and linking in the same step without intermediate files. I don't know how your build script is configured, though, so I can't say whether you should be getting them for your particular case.

Quote:
i believeam supposed to have another smaug.exe

If you don't have smaug.exe, what are you running?
Amended on Wed 12 Apr 2017 09:35 PM by Fiendish
Australia Forum Administrator #9
He's running:


nohup ./startup
USA Global Moderator #10
Nick Gammon said:

He's running:


nohup ./startup



Smarty pants. :)

I don't know how smaugfuss works, so I don't know what that means.
Australia Forum Administrator #11
It basically runs smaug.exe.


#! /bin/csh -f

# Set the port number.
set port = 4020
if ( "$1" != "" ) set port="$1"

# Change to area directory.
cd ../area

# Set limits.
limit coredumpsize unlimited
limit stacksize unlimited
if ( -e shutdown.txt ) rm -f shutdown.txt

while ( 1 )
    # If you want to have logs in a different directory,
    #   change the 'set logfile' line to reflect the directory name.
    set index = 1000
    while ( 1 )
	set logfile = ../log/$index.log
	if ( ! -e $logfile ) break
	@ index++
    end

    # Record starting time
    date > $logfile
    date > ../area/boot.txt

    # Run SMAUG.
    # Check if already running
    set matches = `netstat -an | grep ":$port " | grep -c LISTEN`
    if ( $matches >= 1 ) then
        # Already running
        echo Port $port is already in use.
        exit 0
    endif
    ../src/smaug $port >&! $logfile

    # Restart, giving old connections a chance to die.
    if ( -e shutdown.txt ) then
	rm -f shutdown.txt
	exit 0
    endif
    sleep 60 
end

#12
Ok now I understand, and i have smaug.exe but i thought another should be formed at src after compilation thanks y'all
Australia Forum Administrator #13
It's the "o" folder not the "O" folder. In my case the files are there:


~/Development/smaugfuss/src$ ls o
act_comm.o  chess.o     fight.o     makeobjs.o  planes.o     skills.o
act_info.o  clans.o     handler.o   mapout.o    player.o     special.o
act_move.o  color.o     hashstr.o   mapper.o    polymorph.o  tables.o
act_obj.o   comments.o  hint.o      mccp.o      renumber.o   track.o
act_wiz.o   comm.o      hotboot.o   misc.o      reset.o      update.o
ban.o       const.o     imm_host.o  mpxset.o    save.o       variables.o
boards.o    db.o        interp.o    mud_comm.o  services.o   weather.o
build.o     deity.o     liquids.o   mud_prog.o  sha256.o
calendar.o  dns.o       magic.o     news.o      shops.o
#14
Its not showing here.
Australia Forum Administrator #15
OK, navigate to your "src" directory and type:


find .


Then paste what you got here.

I got:


$ find .
.
./act_comm.c
./act_info.c
./act_move.c
./act_obj.c
./act_wiz.c
./ban.c
./bet.h
./boards.c
./build.c
./calendar.c
./calendar.h
./chess.c
./chess.h
./clans.c
./color.c
./color.h
./comm.c
./comments.c
./const.c
./count
./db.c
./deity.c
./dependencies.d
./dependencies.d.bak
./dns.c
./dns.h
./fight.c
./grind
./handler.c
./hashstr.c
./hint.c
./hint.h
./hotboot.c
./hotboot.h
./house.c
./house.h
./imc.c
./imc.h
./imccfg.h
./imm_host.c
./interp.c
./lines
./liquids.c
./liquids.h
./magic.c
./Makefile
./makeobjs.c
./mapout.c
./mapper.c
./mapper.h
./mccp.c
./mccp.h
./misc.c
./mpxset.c
./mssp.c
./mssp.h
./mud.h
./mud_comm.c
./mud_prog.c
./news.c
./news.h
./o
./o/.gitignore
./o/act_comm.o
./o/act_info.o
./o/act_move.o
./o/act_obj.o
./o/act_wiz.o
./o/ban.o
./o/boards.o
./o/build.o
./o/calendar.o
./o/chess.o
./o/clans.o
./o/color.o
./o/comm.o
./o/comments.o
./o/const.o
./o/db.o
./o/deity.o
./o/dns.o
./o/fight.o
./o/handler.o
./o/hashstr.o
./o/hint.o
./o/hotboot.o
./o/house.o
./o/imc.o
./o/imm_host.o
./o/interp.o
./o/liquids.o
./o/magic.o
./o/makeobjs.o
./o/mapout.o
./o/mapper.o
./o/mccp.o
./o/misc.o
./o/mpxset.o
./o/mssp.o
./o/mud_comm.o
./o/mud_prog.o
./o/news.o
./o/planes.o
./o/player.o
./o/polymorph.o
./o/renumber.o
./o/reset.o
./o/save.o
./o/services.o
./o/sha256.o
./o/shops.o
./o/skills.o
./o/special.o
./o/tables.o
./o/track.o
./o/update.o
./o/variables.o
./o/weather.o
./planes.c
./planes.h
./player.c
./polymorph.c
./qstart
./renumber.c
./reset.c
./resolver.c
./resolver.exe
./resolver.o
./save.c
./services.c
./sha256.c
./sha256.h
./shops.c
./shutdown.txt
./skills.c
./smaug.def
./smaug.exe
./smaug.exp
./special.c
./splint.txt
./startup
./tables.c
./track.c
./update.c
./variables.c
./vg_suppress.supp
./weather.c
./weather.h