Jump to content

Recommended Posts

Posted
What I mean is we could make a new OS which has same kernel as Unix...Will it be possible?

 

don't you mean Linux instead of Unix? Linux is 100% Free(Open Source)

many Unix Flavors are not. i'm not sure, but maybe FreeBSD is an exception.

 

and you literally can save yourself a whole lot of trouble and just take the entire Linux kernel and then modify a bit or a lot to produce a different flavor of Linux and christen it with whatever name you want, provided that you adhere to the GPL.

 

Secondly ,Can we simply use visual c++ to compile the code a new OS?

 

yeah

Posted

but admiral, what I wonder is, in Linux, the excecutable file is not .exe, so wont Micrsoft's Visual C compile the code into Windows program?

 

just for wondering....How can another system's specific compiler compile other thing which is not compatible to itself?

 

Albert

Posted
but admiral' date=' what I wonder is, in Linux, the excecutable file is not .exe, so wont Micrsoft's Visual C compile the code into Windows program?

 

just for wondering....How can another system's specific compiler compile other thing which is not compatible to itself?

 

Albert[/quote']

 

well, like they said, Once a C is always a C.

every os will have it's share of unique set of libriaries for the programming language so learn those. but overall, if you forget about platform specific code, C OR C++ will work in windows just as well as in Linux or Unix. that's the WHOLE purpose in compiling and recompiling the source.

Posted
just for wondering....How can another system's specific compiler compile other thing which is not compatible to itself?

 

You're talking about cross-compilation, which is very possible under the same operating system. gcc (which is pretty much the de-facto C/C++ compiler for linux - which is definately not the same as UNIX btw) can cross-compile source code which is not intended for the same CPU type. For example, you might have a very old Motorola 68k which you can't be bothered compiling things for. No problems, you set up a 68k cross-compiler on a fast box so that you compile things for it. It's not as simple as this, but it's that kind of idea.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.