Hello
When you write code for OS why do you rewrite everything like print function again in C. Cant we use the existing C functions and link the exe statically and convert them into binary file. Why do we do it the other way.
Regards
Ekanth
If you use ANSI C/C++ standard function you don't have to rewrite them. I don't understand what you mean by this:
>Cant we use the existing C functions and link the exe
>statically and convert them into binary file.
If you are porting code to other OS you have to compile source code on each platform and link object files with static or dynamic libraries. And actually linking will produce executable (or libraries).
Of cause only source code is portable (if it is in ANSI standard) and compiled objects are not.
Sometime you have to rewrite some code for specific platform. Such as directory listing or GUI. Also there are some good packages that can do this job for you, for example Qt. Qt is portable GUI that also provide some useful utilities for writing portable application (but this is C++)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.