Thread: c compilers

  1. #1
    Registered User
    Join Date
    Nov 2006
    Posts
    2

    c compilers

    I wrote a program in turbo c 3.0 and generated exe file.I copied that exe file to bsd system its not working.I came to know many reasons for that,different operating system(exe file was made in windows xp),turbo c cannot run on bsd.When i compiled using cc, it generates many errors.Does conio.h wont work in unix.Please let me know c compilers in unix environment(AIX,FREEBSD).can i run turbo c program in these compilers or i need to write a new program again?Thanks

  2. #2
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Quote Originally Posted by kumarangopi
    I wrote a program in turbo c 3.0 and generated exe file.I copied that exe file to bsd system its not working.I came to know many reasons for that,different operating system(exe file was made in windows xp),turbo c cannot run on bsd.
    Why would you expect binaries from one random OS to work on another random OS?
    Quote Originally Posted by kumarangopi
    When i compiled using cc, it generates many errors.Does conio.h wont work in unix.Please let me know c compilers in unix environment(AIX,FREEBSD).can i run turbo c program in these compilers or i need to write a new program again?Thanks
    Stop using non-standard functions, and your code will be portable. You'll still have to recompile, but you won't have to rewrite. Naturally there are some things you need OS specific libraries for. In such cases, redesign, rewrite, or find suitable alternatives.


    Quzah.
    Hope is the first step on the road to disappointment.

  3. #3
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    I don't know what you're using from conio.h, but I think most of its functionality can be found in the ncurses library.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. books with compilers
    By alyeska in forum C++ Programming
    Replies: 3
    Last Post: 12-11-2006, 03:30 PM
  2. C++ Builder Comparison
    By ryanlcs in forum Tech Board
    Replies: 14
    Last Post: 08-20-2006, 09:56 AM
  3. Is It Possible To Install Multiple Compilers?
    By mishna_toreh in forum C Programming
    Replies: 3
    Last Post: 05-13-2005, 07:32 AM
  4. Compilers for Windows
    By LegendsEnd in forum Windows Programming
    Replies: 2
    Last Post: 03-26-2004, 08:03 AM
  5. Compilers, Compilers, Compilers
    By Stan100 in forum C++ Programming
    Replies: 11
    Last Post: 11-08-2002, 04:21 PM