Click here to Skip to main content
16,021,172 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
1.Could you give me some suggestions/useful links/books
2.Could you tell me some successful portable C/C++ project that's open source
3.Do you have any idea on writing portable GUI program? QT is the best choice except Java?
Posted
Comments
ryan20fun 25-Sep-10 5:41am    
What exactly do you mean by portable c/c++ programe
Sandeep Mewara 25-Sep-10 5:57am    
Google?
ryan20fun 25-Sep-10 6:14am    
Sorry but I don't quite get your comment there,
Allow me to asume you know what app you want to make,
I would just write the programe ass usual,
And put it on the usb stick and create a autorun.ini file with the
Following text in it,
[Autorun]
Open=YOURAPPNAME
Icon=YOURICONNAME
Note I may have miss spelled some of it
As I am away from my pc right now
Hope this helps

First thing is there's no such thing as a C/C++ program. C and C++ are very different languages with very different idioms.

Now I've got my saturday morning rant out of the way if you want to program portably in either language then K&R is a good reference for C and Stroustrup's book ("The C++ Programming Language" 3rd edition) is a good reference for C++. The thing to remember with portable programming is never use an OS facility or vendor extension to a language when there's a way of doing it within the core language.

Interesting portable open source projects include:

- OpenSSL
- Expat
- Boost
- Python

If you want to write portable GUIs in C++ then there are loads of options. I've used FLTK and wxWidgets successfully. However something like RealBASIC works pretty well for me as well so limiting yourself to C++ might be a bit of a mistake.

Cheers,

Ash
 
Share this answer
 
I hope you refer to source code portability. That's what the language standard specification is good for and there are many (although tedious) ways to accomplish this. Please consider that there is no binary compatibility of c++ (or c) programs as you might know it from JVE or .Net meaning that a code compiled for one platform cannot be run on others.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900