Solved

MS VC++ 6.0 and the C library

Posted on 1998-12-23
6
197 Views
Last Modified: 2010-04-16
Hey all!

I'm reading "Tricks of the Game Programming Gurus" and
I can't get the key.c in chapter 3 to compile.

I'm missing the "bios.h" file.
Is this file not included with VC++ anymore?

What should I do?

Thanks,
Big Badger
0
Comment
Question by:BigBadger
  • 4
  • 2
6 Comments
 
LVL 86

Accepted Solution

by:
jkr earned 100 total points
ID: 1180961
The answer is as cruel as it is simple: You need a 16bit compiler, as the functions included in 'bios.h' arent supported on 32bit platforms, and as VC6 can't produce 16bit executables, the file has been removed...
0
 
LVL 86

Expert Comment

by:jkr
ID: 1180962
Ooops - well, you could of course also try to replace the functions from 'bios.h' with 32bit equivalents, but this is not simple - and as there are not necessarily 32bit equivalents of all functions, you might have to re-write the code completely...
0
 

Author Comment

by:BigBadger
ID: 1180963
Hey jkr,

Thanks for answering.
It seems like there is always another obstacle
in my way.  I'm trying to learn game programming
and this is the 4th book I've bought.  The friggin
code will never compile.

Is there still a 16 bit C compiler with inline assembler available?  
Do you know where I could find 32 bit versions
of these C functions?

How should I proceed from here?

Thanks
Big Badger
0
Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

 
LVL 86

Expert Comment

by:jkr
ID: 1180964
Well, a good choice would be the GNU C compiler, as it is free ;-)
As you were talking about game programming, i assume you want to directly use the video capabilities of the system, so 16bit DOS would eventually be the best choice (at least for the moment - think of DOS extenders like dos4gw or the one that comes with GNU C)
About the 32bit conversion: It'll be difficult - the direct disk I/O routines as well as the COM routines have been superseded by a totally different (and incompatible) programming model. The same problem occurs with almost all functions - most of the information is still available, but through a very different set of Win32 APIs...
0
 

Author Comment

by:BigBadger
ID: 1180965
Thanks jkr!
I'll look on the web for the GNU C compiler.

Big Badger
0
 
LVL 86

Expert Comment

by:jkr
ID: 1180966
If you encounter problems using it, feel free to ask ... ( i like it ;-)
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now