PDA

View Full Version : Compiling under linux


ZerooftheFour
06-14-2006, 11:32 PM
i have spent long hours trying to research on how to build the .so file and have been google and posting on how to build linux for about 2-3 weeks now and im really tired of seaching, would it be possible if someone can give me a very very detialed tutorial on how to get the .so file from my code... i would be most greatfull... and i could proply paypal you a small 5-10 dollar tip or something if i can manage this... i have spent way to much time... and im desperate

razorace
06-15-2006, 12:02 AM
Well, first off you need a linux compile. After that you need a makefile to compile the project. OJP already has a makefile for gcc if you need an example. After that all you gotta do is make in "make" while in your /game directory.

ZerooftheFour
06-15-2006, 05:31 AM
i have heard stuff like that serveral times before and i know the make file, i just have no idea what linux compiler to use, there seems to be so many builds of linux and if i do get linux idk how i would run the make file anyways... i need something really detailed, im a complete noob at linux and coding in general

Vruki Salet
06-15-2006, 10:02 AM
Just use gcc like comes with practically any distribution and certainly with whatever one you would be using. What are you using btw?

Cd to where it is the file called "Makefile" in the OJP source code folder is. It's in the "game" directory. The exact path depends on where you put your OJP source files. Examples might be something like "/home/zeroofthefour/OjpSource/OJP/Basic/source/game" or "/usr/local/games/OJP/Basic/source/game." Use the "cd" command to go to wherever it is then type "make" and press enter. Poof, it should compile.

Uh, how long have you been using unixy systems? You *do* know how to use the terminal (command line console) right? Do you have your build tools installed right? That's the compiler and libraries and stuff. Look and see if there's a file called gcc in your /usr/bin directory or else if not there try /usr/local/bin or even /opt if any linux has such a thing.

ZerooftheFour
06-15-2006, 09:13 PM
i have no idea, could you give me a link so that i can get a linux command prompt or a gcc or whatever? i just seen so many builds of linux and im not sure of any of them, im a simple .dll guy that just wants to some basic weapons and force editing, but my server only takes linux, i have seen the makefile and i have the .patch or whatever but those are the only things i have that i belive are linux related, other then that im lost on what i need and need to do

Vruki Salet
06-16-2006, 12:06 PM
First of all you need linux installed on a computer.

Perhaps you should do your programming on windows until you're satisfied with it, then ask someone who has linux (especially the same distribution and version as your server) installed to compile it for you. I would but unfortunately I don't have linux atm just openbsd.

Can you tell what distribution and version your server runs? (I.e. what "brand" like redhat or gentoo or whatever, and release number of the distribution and kernel version would be nice, for example it could be "redhat 9.x" or "slackware 10.2 with kernel version 2.6.13")

edit: I might consider installing linux if it would be helpful. I'm going to need it eventually anyway.

ZerooftheFour
06-17-2006, 12:35 AM
im not to sure on the brand and such of my linux server, isnt all .so files the same? its just the game folder of the code into a .so isnt it? and if you do get linux and when im finished preping my code do u mind if you could proply compile it for me? i could pay you like a small fee or something. either that or maybe you could point me in a direction to get linux... check this site out and see if maybe those 3 iso are what i need for linux.

http://iso.linuxquestions.org/version.php?version=71

and do all linux builds have that command promp? is it like windows (start/run...) sorta thing?

Vruki Salet
06-17-2006, 11:36 AM
It'll be a sad day when someone distributes a linux without a command prompt.

Things can often be compiled in a generic least-common-denominator fashion that will run on most versions but if you can compile them on similar or identical systems you have a better chance of having a successgul build and of having your executable run right, and also for many programs you can optimize your executable to be more efficient for you specific version.

Well if I get it installed then I'll do it as long as I can get your code since I might be offline for a while. That's just a chance not a certainty. You wouldn't need to pay me I doubt it would be *that* painful. ;)

So what changes have you made to the code that you need to compile? I'm just curious.

-----

About the link to those files, I always enjoyed using Mandrake for a desktop. They changed their name though and I think a more recent edition is here http://www.linuxiso.org/distro.php?distro=29 under the name 'Mandriva.' Wow I hate that name... Bleah. I'm getting it though and will try to get to installing it over the weekend maybe even today.

Sushi_CW
06-17-2006, 03:48 PM
Most Linux servers will already have gcc installed on them. If you're running on a more or less default configuration, I think you should be able to do the following:

1) Copy the entire OJP/basic/source directory to your Linux server. You can zip it or tar it first if you want, just move all of the relevant files to the server.
2) Open a command prompt on your server. How do you access it now? Directly or via a remote connection? If you actually sit down at a keyboard and monitor connected to the server, look for a shortcut on your desktop or in a menu that says "Gnome Terminal" or "xterm" or pretty much anything with "term" in it. Most of those are command prompts, and any of them will work.
2) Once you have a command line, go where you put the source files copied from your windows comptuer, then to the subdirectory for the .so you want to build. Example: for cgame, go to OJP/basic/source/cgame.
3) Once you are in the folder on the command line, you should be able to just type "make". GCC should run and output your file (probably in the same directory).

Hope this helps...good luck!

Vruki Salet
06-18-2006, 10:41 PM
I can't install the stuff unless I find 3 good CDs to burn the isos to. Oops. I might have some around so I'll let you know what's up as soon as possible, 0of4.

ZerooftheFour
06-19-2006, 05:45 AM
i tryed getting mandriva i386 @ http://www.linuxiso.org/distro.php?distro=29 and when i tryed to install it my moniter kept flashing in and out, and then when i went to my other comp, it just didnt work...

ensiform
06-19-2006, 09:27 AM
get ubuntu dapper drake 6.06.

Vruki Salet
06-19-2006, 09:57 AM
i tryed getting mandriva i386 @ http://www.linuxiso.org/distro.php?distro=29 and when i tryed to install it my moniter kept flashing in and out, and then when i went to my other comp, it just didnt work...

Wow that's weird. How about trying the one ensiform suggested instead?