Jump to content
  • Advertisement
Sign in to follow this  
tppramod

GCC Vs Turbo C

This topic is 4841 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

i have been compiling my C Code using Turbo C v3.0so far. Now i just wanted to try out with gcc compiler. it is said to be best compiler for optimization. What changes do i need to make in my code to compile with gcc. Thanks & Regards,

Share this post


Link to post
Share on other sites
Advertisement
As long as you conform to standard C then changes to code should be none to minimal, a C compiler does not define the C language they implement and try to adhere to the C standard specification. Now i don't know how standard compliant Turbo C v3.0 is if its not so standard compliant then you have most likely written non portable code hence the need to change it for compilers that have better standard compliance.

Share this post


Link to post
Share on other sites
Turbo C version 3.0 is a DOS compiler, and chances are you'll be using a 32 bit version of GCC. If your program is fairly simple then you won't need to do much to tranfer the code to GCC. If the program does anything complex that needs to use DOS facilities or uses pointers to any large degree then you may need to do quite a bit of work to migrate the code. For example, near, far and huge pointers need to be transformed into normal pointers since near far and huge are not needed in a 32 bit environment. Use of the BGI graphics functions will need to be completely rewritten as will use of interrupts.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!