Closed Thread Icon

Preserved Topic: games on linux (Page 1 of 1) Pages that link to <a href="https://ozoneasylum.com/backlink?for=16081" title="Pages that link to Preserved Topic: games on linux (Page 1 of 1)" rel="nofollow" >Preserved Topic: games on linux <span class="small">(Page 1 of 1)</span>\

 
JakeB
Paranoid (IV) Inmate

From: us
Insane since: Oct 2000

posted posted 06-18-2001 17:43

i thought this was going to be easy, but i somehow messed it up

i downloaded a game off the internet. I put it into /usr/local because i thought i had to to let all users use it. It was tar gzipped so i 'tar -zxvf file.tar.gz'. i went into the new folder and opened INSTALL. It tells me to

% ./configure
% make
# make install

what's the '%' and '#' for? i though maybe it just means that you can't do the last command unless you're root?

so i did './configure' then 'make' and i get some errors:

seek_and_destroy.cc: In function 'message_to_robot_type name2msg_to_robot_type (char *)':
seek_and_destroy.cc:45: 'strcmp' undeclared (first use in this function)
seek_and_destroy.cc:45: (Each undeclared indentifier is reported only once for each function it appears in.)
make[3]: *** [seek_and_destroy.o] Error 1
make[2]: *** [all-recursive] Error 1
make[1]: *** [all-recursive] Error 1
maek: *** [all-recursive-am] Error 2

here is the function that uses strcmp

message_to_robot_type
name2msg_to_robot_type(char* msg_name)
{
for(int i=0; message_to_robot[i].msg[0] != '\0'; i++)
{
if( strcmp(message_to_robot[i].msg, msg_name) == 0 )
return (message_to_robot_type)i;
}
return UNKNOWN_MESSAGE_TO_ROBOT;
}

is strcmp an old function that was used by c or am i thinking of something else? what am i doing wrong?

hyperbole
Paranoid (IV) Inmate

From: Madison, Indiana, USA
Insane since: Aug 2000

posted posted 06-18-2001 17:48

The '%' and '#' are just characters often used to indicate a command prompt. It is unusual to see them mixed like that. If you want to install the program so all users can access it from /usr/local/bin/ you would probably need to be root. It depends on how you have the permissions set on your system.

strcmp is a standard C function for comparing two strings. You should be able to get rid of the errors by including <string.h> at the beginning of the file.




linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-18-2001 17:52

what's the '%' and '#' for? i though maybe it just means that you can't do the last command unless you're root?

yes, exactly. It's saying you need to be root to run make install, but not to build the game.

so i did './configure' then 'make' and i get some errors:

Uh, were the errors from configure? they looked like they were from make.

It looks like the compliler can't find the header file for strcmp(). Usually running configure finds all the necessary libraries, or complains if it can't. Did configure return any errors?

JakeB
Paranoid (IV) Inmate

From: us
Insane since: Oct 2000

posted posted 06-18-2001 18:05

thanks, it works now. but since i installed it into /usr/local/games/RealTimeBattle it will only play for root? i just looked now into /usr/local/bin and there is a file that's called RealTimeBattle and it has a little star next to it on the browser.(does this mean script?) and all the file says is 'ELF', what's that mean? is it some kind of shortcut?

how do i make a shortcut on the menu for all users that opens the game so i don't have to goto the directory and then type RealTimeBattle.

and what's the command that tell's you what directory you are in? Thanks

edit: the errors were from make and configure didn't have any errors



[This message has been edited by JakeB (edited 06-18-2001).]

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-18-2001 19:50

Damn, JakeB, you always cram in half a dozen questions per post

It should play for anyone who can execute it. So if permissions look like -rwxr-xr-x everyone should be good to go.

Dunno about the star, because I'm not sure what you're using to view it....

ELF is an executable file format, so that's a good clue that this is executable.

/usr/local/bin may or may not be on your $PATH, try echo $PATH at a shell to see. You can add /usr/local/bin to your path in bash like this:
export PATH=$PATH:/usr/local/bin

You may want to add it to the path in /etc/bashrc.

You could also use an alias in your .bashrc file to shortent the command
alias rtb /usr/local/bin/RealTimeBattle

pwd will print the working directory.

Adding it to the menus depends on what window manager you use.

JakeB
Paranoid (IV) Inmate

From: us
Insane since: Oct 2000

posted posted 06-18-2001 20:28

i use gnome, i have no idea what it's like compared to other windows managers. I also have kde on the cd it came with. Is one 'better' than the other?

so if i see the * next to a file, and i open it up and it and it says ELF it is an executable, like a binary file on windows.

linear
Paranoid (IV) Inmate

From: other places
Insane since: Mar 2001

posted posted 06-18-2001 20:44

Under Gnome, you should be able to add to the favorites menu by choosing Settings

« BackwardsOnwards »

Show Forum Drop Down Menu