Dark Bit Factory & Gravity
PROGRAMMING => C / C++ /C# => Topic started by: Ampli on November 19, 2008
-
Hi i just started to learn some c++ on linux. can someone give me some tips where i can find some info about linux API or something that shows how i can make a messagebox and open a window and such on linux. i tryed some on windows and it worked well but im more like a Ubuntu nerd for now. =)
-
@Ampli:
Maybe this is usefull for you to develop on ubuntu...
http://www.xml.com/ldd/chapter/book/index.html (http://www.xml.com/ldd/chapter/book/index.html)
http://www.linux.org/docs/ldp/howto/HOWTO-INDEX/programming.html (http://www.linux.org/docs/ldp/howto/HOWTO-INDEX/programming.html)
[Edited]
Btw have you searched if one of following API calls is available on Linux/Ubuntu for Mesagebox?
kdialog()
xmessage()
-
i cant test it.. but hope it works... docu for something like MsgBox on Win32
Identifier
xmessage
Purpose
Send a message to the user in a widget
Synopsis
answer = xmessage (message, title=title, yes=yes, no=no)
Arguments
Name I/O Type: Description:
------------------------------------------------------------
message I string Message to the user
title I string Title for the widget window
yes I string Text for positive acknowlegment
no I string Text for negative acknowledgment
Returns
answer O integer 1 for positive, 0 for negative ack
Description
This function shows a message to the user and asks for
acknowledgment. You can give two types of messages:
1. An informative message, i.e., just print some information on
the screen. The user can only press an OK button.
2. A `Yes' or `No' message, i.e., ask a question. The user must
answer by pressing the yes or no button. The text in these
buttons can be specified by the to keywords.
The message itself can be a single string or an array of
strings.
Example
junk = xmessage (['Houston, we have a problem!', '', $
'I don't wanna die.....'])
[Edited]
Something more i found for you:
http://www.advancedlinuxprogramming.com/ (http://www.advancedlinuxprogramming.com/)
-
Thanks for the tips. i will look at it now... i havent found any useful info for ubuntu about it. its much easier to find info for windows.hehe but i will try to survive on linux for a while.
-
Nothing to thanks for... btw i found a site with some nice examples (coding CPP on linux) with examples and sources like for xmessage
http://homepages.ihug.co.nz/~trmusson/programs.html (http://homepages.ihug.co.nz/~trmusson/programs.html)
-
how i can make a messagebox and open a window and such on linux
KDE is based on Qt (http://doc.trolltech.com/4.4/index.html) which is a great (but complex) toolkit.
-
i have kdevelop installed. dont know how to use it yet tho.
-
Kdevelop seems to be good , but never use it.
For have some program compatible with windows you can use these following libraries :
OpenGL ( 3D ) , FMOD ( Sound ) ,SDL ( 2D ) , OpenAL ( Sound ) , Qt ( Windows User interface ( don't know how to say that ) , Gtk ( for the same thing that Qt , if you search some example of the kind of windows is like Gnome ( other windows manager as KDE ).
If you want something for only Linux , you can search documentation about the X11 ( like WinAPI ... )
Hope this help