The Ur-Quan Masters Discussion Forum

The Ur-Quan Masters Re-Release => Technical Issues => Topic started by: Daze on June 30, 2005, 10:27:06 pm



Title: problem with compiling sourcecode
Post by: Daze on June 30, 2005, 10:27:06 pm
Hi all,

I tried altering the source code a bit. Had some fun in altering the ships and resources on planets, but now I realized I have no idea how to compile this new code.

I just altered the .C files and can't seem to find any projectfiles to work with.

I use Borland C++ builder 6 on Windows XP pro.

Any1 care to help me out on this one?

Thanks in advance!


Title: Re: problem with compiling sourcecode
Post by: Halleck on July 01, 2005, 05:18:15 am
Can borland c++ builder compile normal c? I was under impression that there was a distinction. And I think UQM is written in C, not C++... don't quote me on that, though.

Anyway, the first thing I would try is getting all the required libs and include files listed in the INSTALL document.
If that doesn't work, I'd try getting a different compiler. GCC will probably get the job done. An alternative is microsoft's  visual c++ .net toolkit 2003, and i heard they had a beta of VC++ 2005 available somewhere. (All of these compilers are free of charge, btw).


Title: Re: problem with compiling sourcecode
Post by: Daze on July 01, 2005, 04:35:30 pm
I have used the C++ builder for regular C before, so it should work. I'll try what you said.

Thanks!


Title: Re: problem with compiling sourcecode
Post by: meep-eep on July 04, 2005, 04:35:31 am
UQM comes with project files for MS dev studio, as that's what the Windows developers use, but none for Borland. You'd have to make your own for that. If you join us on IRC we may be able to give you some tips as you go along.


Title: Re: problem with compiling sourcecode
Post by: abcminiuser on July 04, 2005, 06:32:57 pm
C++ is just an extension of C. All C++ compilers can compile regular C code, but NOT vice-versa.

- Dean


Title: Re: problem with compiling sourcecode
Post by: Yurand on July 04, 2005, 07:37:15 pm
Quote
C++ is just an extension of C. All C++ compilers can compile regular C code, but NOT vice-versa.

- Dean


Wrong, here is example:
---------------------------------------------
#include <stdio.h>

void foo(void* p)
{
}

int main()
{
 foo("bar");
}
---------------------------------------------

You can compile this code using C compiler, but C++ one will report error.


Title: Re: problem with compiling sourcecode
Post by: Culture20 on July 05, 2005, 01:19:15 am
Oh poo.   :P  Throw a const in there and everything's fine (for both C & C++).  C++ needed a little more rigorous syntax parsing than C used.

Daze, for 99.9999% of the C code out there, abcminiuser is correct.  Yurand pointed out part of the other 0.0001% :)