Jump to content

Home

Compiler optimization


CerberuS_21

Recommended Posts

I remember ensiform posting a thread about optimizing compiler options in order to improve performance. Unfortunately, that thread seems to have vanished (due to the technical problems LF is having recently I suppose).

 

If ensiform or anybody else could re-post the contents of this thread, that'd be great :)

 

(Decided to create a thread instead of using PM since I think this might be of interest for more people than only myself.)

Link to comment
Share on other sites

  • 2 weeks later...

Me too. The only problem I've ever had with it is that sometimes the gcc compiler craps out and gives you a bogus .so file. When this happens, the .so simply makes the game immediately crash on start up. To fix this, I just delete all the .o files and recompile. It doesn't happen very often thou.

 

Other than that, things have worked fine for me with gcc. The only real difference is that using the gcc code requires some minor definition changes to fix a variety of compiler errors that you get with gcc that you wouldn't get with icc.

Link to comment
Share on other sites

to compile on linux i did this

 

i downloaded the universal jk3 source which qubit made

 

it's called universal source on lucasfiles

 

it includes a patch written by qubit (aka devoid, the second developer of jk2++), this will let it compile with gcc

 

 

but it didn't really work out for me. so i asked hex how to do it.

 

he pointed me to cmake (cmake.org) which you can use to create makefiles and scripts to build a project on any OS

 

 

he also gave me his build scripts he made for jk3, excluding the lines that include his modules for the jk3 server

 

 

so, all i have to do to get a linux .so is to do ALL the development in the .net editor in xp. then

 

1) reboot to slackware

2) cd to /game (same folder i'm working with in windows)

3) run "cmake ."

 

bam, instant .so

 

no fuss, no muss

Link to comment
Share on other sites

  • 2 weeks later...
  • 4 weeks later...
  • 2 weeks later...
  • 3 weeks later...
I'm not sure what you mean by "statically" linking the libraries.

 

Nevermind, I got it compiling sweetly on the Intel Compiler. Statically linking libraries means that you do not need to include them with your Binary. For example, we need to link the math library with whatever we are compiling with.

 

gcc = -lm

icc = -limf

 

If you dynamically link these in the linker (as seen above), then you have to have them on the server in order to run. If you statically link them (in icc it's "-Bstatic -limf"), then they are built in with your binary. If you want to see an example of my makefile, I can post it here. It's much easier to see it than explain it, heh.

 

-c1

Link to comment
Share on other sites

  • 5 months later...

It only seems proper to post here, but I hate bumping old posts up, and I appologize for this.

 

I coded my own mod for quite some time now, and im ready to begin building in Linux. I have my Linux laptop all ready to go here, and would like to begin the process.

 

I tried http://www.lucasfiles.com/?s=&action=download&id=367&agree=true but no luck. Just tons of warnings.

 

I tried this idea here, which was the cmake program, but it tells me to make a CMake.txt file, and I have no idea how to go about that, and the documents for CMake are very confusing to me. Does anyone have a pre-built one I could use?

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...