• How hard is it to develop cross platform as a beginner?
    5 replies, posted
I'm still learning C#, but one of my highest priorities if I ever make programs in the future is to keep my program cross platform preferably on Windows, OS X, and Linux. Is it hard for a person whose only programmed and compiled on Windows due to the book using it?
C# makes it fairly easy to run your stuff cross-platform. You should be right as long as you don't do any stupid stuff like hard-coding paths, etc.
look up Mono. Follow Venice Queen's advice though, certain things like a Windows-style filesystem won't work in any unix-based systems, and extern calls to Win32 methods won't work in OSX or Linux. Just be careful for stuff like that.
It'd also be an idea to consider endian-ness for data if you're going to be doing networking or transferring between different architectures. You might also need to be careful about the sizes of types - "int" generally means 4 bytes (32 bits) but I think it's left open to the implementation - at least this is the case in C++. I'm not sure how much C# does for you in terms of type sizing or endian-ness.
Int may be 4 bytes on C++, but C++ never specifies how many bits a byte may be, although it must be over 8.
Hey, [QUOTE=Cookieeater;27703403]I'm still learning C#, but one of my highest priorities if I ever make programs in the future is to keep my program cross platform preferably on Windows, OS X, and Linux. Is it hard for a person whose only programmed and compiled on Windows due to the book using it?[/QUOTE] With C#, as long as you stay away from platform specific calls/paths, the difficulty of running your application on a different platform is directly proportional to the difficulty of getting the latest Mono installation on that platform. For a lot of Linux distros, this is an extremely easy 1-line step, so porting your application will be a breeze.
Sorry, you need to Log In to post a reply to this thread.