Jump to content

Cross platform programming

- - - - -

  • Please log in to reply
10 replies to this topic

#1
Rzgar

Rzgar

    Newbie

  • Members
  • Pip
  • 3 posts
Hi all,
afew days ago decided to learn a low level language, searched around and decided to learn C#. after a few hours could create a simple notepad but I wasn't quite happy with C#. I sent my so called app to a friend and the 580 KB app required user to install .NET framework 4.0 . He lives in a middle eastern country which has slow internet speed therefore downloading a big sized .net package is not an option. Now i need help to deiced. Is there any other way to write a program with out requiring user to install some sort of libraries or Framework etc?
I heard C++, Python are cross platform but how can I visualize and create window forms without learning another language?
just wanted to be able to write code, compile it and when user try to install it, it doesn't requires anything else to work properly.
Thanks in advance

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
C++ can do that, with the appropriate GUI libraries. You can compile them into your program so users don't need to install anything else.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
ZekeDragon

ZekeDragon

    Writes binary right handed and hex left handed

  • Moderators
  • 2,103 posts
The .NET framework is required (Windows too) for any C# or VB.NET program. This sucks, but many other programs come with dependencies as well, for example Java requires the Java Runtime Environment, and Python requires the Python Interpreter. However, the CPython interpreter's Windows Installer package is 15.3MB, the JRE's Windows Offline Installer is 15.75MB, and the .NET Framework 4.0 Standalone Installer is 48.1MB. As the runtime that is 3X the size of the others, if you had to go with a language with a framework it might as well be one that your buddy can download or most likely already has (IE the JRE).

I'm going to have to go with WingedPanther's answer and say that if you want to write a GUI app with one of those three languages you've asked, I think the best answer is with C++. You could also consider using Python, but that does need a runtime and will most likely need both a dynamically linked library and the necessary bindings to make it work with GUI. If you use C++ and the standard Windows GUI set you probably wouldn't need to have your friend install anything, since your executable will otherwise have no other dependencies than the OS. I also won't make any suggestion of toolkit, should you choose to use one, as I think that the toolkit you use is a matter of personal taste and greatest utility for the project at hand.
Wow I changed my sig!

#4
Rzgar

Rzgar

    Newbie

  • Members
  • Pip
  • 3 posts
many thanks guys, I already got through e few C++ tutorials and watched a few videos, seems C++ developer are not quite happy with C++ template ( if you manage a big project and make a bit of changes in your project then you have to recompile template files again which I'm far away from this level) and memory management should be done manually. But I with no background of programming, think that in C++ user will learn programming not meta data. But I have to admit in visual studio using .NET framework you can quickly create program. since yesterday I created almost a fully functional notepad without writing much of code. But all I learned was how to call .net elements and didn't felt like I'm learning anything. C# is not free and MS controls it but C++ is free and no big guy or a company's profit decide over its future.

about GUI libraries, any suggestions about GTK+ & QT and wxMSV?

#5
rocketboy9000

rocketboy9000

    Learning Programmer

  • Members
  • PipPipPip
  • 79 posts
C++ is what you need if you want to have a single download. I think wxWidgets is a good library for GUIs.

#6
Alexander

Alexander

    It's Science!

  • Moderators
  • 4,118 posts
  • Location:Vancouver, Eh! Cleverness: 200
I am afraid choosing between GTK+, wx and Qt are best left for you to decide until you know what you like out of each one, I believe all of them have form designers but hand most of the control over to you (and C++'s class support and better memory management will aid you in working with threads and graphical applications)

As for size, you can compile them as a static library (build in to the program, some may be around 100kb-4mb added) or as shared object (.dll or .so, meaning it is installed once and can be reused without including it with further application, if the user has it)
Be sure to read the updated FAQ! || Health is achieved through the same 10,000 steps.
If a suggested code/method fails, informing us is less important than telling us why or what errors occurred.

#7
DarkLordofthePenguins

DarkLordofthePenguins

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 409 posts
C# is not a low-level language. It's actually very high-level, which is one of the reasons why it's so weak. If you want to do cross-platform programming with C#, you can use the Mono framework with Mono Develop.
Programming is a journey, not a destination.

#8
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts
Or you could try Pascal using FreePascal compiler and Lazarus for IDE tools. Since you are already familiar with C#, you will find that the basic framework of both languages are quite similar.

#9
DarkLordofthePenguins

DarkLordofthePenguins

    Programming Expert

  • Members
  • PipPipPipPipPipPip
  • 409 posts

LuthfiHakim said:

Or you could try Pascal using FreePascal compiler and Lazarus for IDE tools. Since you are already familiar with C#, you will find that the basic framework of both languages are quite similar.

Although, judging by your previous Windows-centric posts, I'm guessing what you're suggesting is a Windows-only IDE/framework.
Programming is a journey, not a destination.

#10
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others

DarkLordofthePenguins said:

Although, judging by your previous Windows-centric posts, I'm guessing what you're suggesting is a Windows-only IDE/framework.
No, he isn't.
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#11
LuthfiHakim

LuthfiHakim

    Programming God

  • Members
  • PipPipPipPipPipPipPip
  • 763 posts

DarkLordofthePenguins said:

Although, judging by your previous Windows-centric posts, I'm guessing what you're suggesting is a Windows-only IDE/framework.

FreePascal is cross platform compiler. It's available for Windows, Windows CE/Mobile, Linux, MacOS, FreeBSD, and many more. Instead of guessing, a little googling will give you hard fact that it is cross platform.




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users