View Full Version: C++ win32 and linux

C++ Learning Community > C++ Tips > C++ win32 and linux


Title: C++ win32 and linux
Description: Need info


Maverick - November 16, 2003 10:01 PM (GMT)
Hi... iam new to C++ and i learned the basics console stuff
now need to go over some GUI apps programming
i know windows uses win32 header files and linux may use other stuff

my question

does C++ programs work on linux if used win32 header files

and do u recomment using win32 programming for GUI apps
is it the only way ?

thnx

ih8censorship - November 16, 2003 10:21 PM (GMT)
well im pretty sure theres a few standard headers that are cross platform such as iostream but to make like a gui that works in linux and windows that might be kinda hard i duno for sure since i only have windows. i bet you could look at some mouse click tutorials and "hand code" a type of gui in a console window... that would probly work... but as for using windows headers i dont think that would work in linux ;)

Incubator - November 17, 2003 07:00 PM (GMT)
w00t, here i go :P

ok, here is the big deal: windows and linux are like water and fire.
There are certain ANSI C/C++ headers of the C/C++ STL (Standard Template Library) that will work on every platform, however those are for console apps.
For GUI apps in linux I suggest you look into Qt (http://www.trolltech.com)
it has versions for linux, windows, solaris, etc, but the windows version is limited, but will do for regular apps (has no opengl support)
the linux version is full and free GPL-licensed (has opengl support and the whole mumbo-jumbo)

There is of course like the WinAPI, the XLib API, Xlib is a bit better designed than winapi, and has my personal preference above winapi

There is GNOME, if you have the GNOME libraries installed, you can use them to make an app fully in GNOME style, but they are quite heavy.

KDE, KDE is a framework based on Qt, very nice, but also heavy, though much lighter then GNOME (more info on http://www.kde.org and http://www.kdevelop.org)

wxWindows -- this is like Qt a cross-platform framework, didnt try it yet, but you can always google for more info :)

GTK+ -- also crossplatform, it is that wich GNOME is based on, but much lighter

and of course, this isnt C++ related, but you can always use Java, Java Swing is great in linux, much fastter there too and of course, you guessed it, cross-platform :)


My personal overall preference goes to QT.
It is very Obecjt Oriented like Java, versatile, flexible, has opengl support, can also be compiled in windows with QT/Windows-non-commercial in MSVisual Studio 6


enjoy :)




* Hosted for free by InvisionFree