Archived

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

borland builder and quake 2 source

This topic is 5815 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Does anyone know how to compile the quake 2 source code using borland c++ builder 5.0, I have figured out how to compile it with microsoft visual c++ 6.0 learning edition but I have the full borland c++builder 5.0 but I cannot figure out how to build the dll with it... any help appreciated.. thanks

Share this post


Link to post
Share on other sites
When I chose the new and dll wizard it asks if i want to create a c or c++ and multithreaded or not options i picked c and multithreaded and it creates a file call unit1.c does that need to stay in my project or be deleted and then I added the source files from the quake2 source code and told it to compile but it gives 3 warnings and 1 error one is illegal use of floating point
any ideas

Share this post


Link to post
Share on other sites
MSVC Projects are non-multithreaded Windows GUI Console Apps -- Do File->New->Console Wizard, choose C++, and untick everything else.

Copy the main source file (with WinMain) into the new CPP file.

Voila!

However, if it uses .lib files then you will need to get Borland equivalents...

Share this post


Link to post
Share on other sites
Doesnt BCB5 have an import wizard for MSVC project files? I know BCB4 used to.

Once there was a time when all people believed in God and the church ruled. This time is called the Dark Ages.

Share this post


Link to post
Share on other sites
These are the code lines and the warning and error messages that i get when i compile all the code it gets through about 3 .c files and stops with warning and error messages.
warning #1 __asm fld dword ptr [esp+4]

W8002 Restarting compile using assembly Compiler warning
Command-line option to suppress warning: -w-asc)

The compiler encountered an asm with no accompanying or #pragma inline statement.

The compile restarts using assembly language capabilities.

Default = On


warning #2 if (coop->value && attacker->client)
attacker->client->resp.score++;

E2060 Illegal use of floating point Compiler error
Floating-point operands are not allowed in these operators

shift (SHL, SHR)
bitwise Boolean (AND, OR, XOR, NOT)
conditional (?
indirection (*)
certain others

The compiler found a floating-point operand with one of these prohibited operators.



warning #3 return strcasecmp (s1, s2);


W8065 Call to function ''function'' with no prototype Compiler warning

This message is given if the "Prototypes required" warning is enabled and you call function ''function'' without first giving a prototype for that function.


warning #4 if (strlen(newi) + strlen(s) > maxsize)

W8012 Comparing signed and unsigned values Compiler warning
(Command-line option to suppress warning: -w-csu)

Since the ranges of signed and unsigned types are different the result of an ordered comparison of an unsigned and a signed value might have an unexpected result.

Example:

#pragma warn +csu

bool foo(unsigned u, int i)
{
return u < i;
}


error #1 if (coop->value && attacker->client)
attacker->client->resp.score++;

E2060 Illegal use of floating point Compiler error
Floating-point operands are not allowed in these operators

shift (SHL, SHR)
bitwise Boolean (AND, OR, XOR, NOT)
conditional (?
indirection (*)
certain others

The compiler found a floating-point operand with one of these prohibited operators.

Share this post


Link to post
Share on other sites
Since I tend to stay well away from assembly, I can''t help you with the first warning....

Since I haven''t looked at the source I can''t be sure, but if coop->value and/or attacker->client are floats/doubles, then the if statement can be changed to:

if ((coop->value > 0) && (attacker->client > 0))

or it might be "... != 0"... I''m not sure how signed values equate in boolean terms.

The third warning comes up in practically all MSVC code... so just ignore it.....

Share this post


Link to post
Share on other sites