hi,can we make Dos program in linux so that i can execute it whenever i want in any system.

Recommended Answers

All 2 Replies

When your code is compiled, it is tailored for a specific environment (e.g. operating system, or certain library support). You can't just create a binary that'll run on anything, anywhere.

Probably the best way to create a binary that can run on multiple systems is to use Java. It uses a virtual machine to interpret the bytecode, so it's platform-independant (for the most part; sometimes libraries are stupid).

Another thing you can do is compile the DOS program, and then use Wine to use it on Linux.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.