• Welcome to Dark Bit Factory & Gravity.
 

Linux

Started by Ampli, November 19, 2008

Previous topic - Next topic

0 Members and 0 Guests are viewing this topic.

Ampli

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. =)

va!n

#1
@Ampli:
Maybe this is usefull for you to develop on ubuntu...

http://www.xml.com/ldd/chapter/book/index.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()
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

va!n

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/
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

Ampli

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.



va!n

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
- hp EliteBook 8540p, 4 GB RAM, Windows 8.1 x64
- Asus P5Q, Intel Q8200, 6 GB DDR2, Radeon 4870, Windows 8.1 x64
http://www.secretly.de
Challenge Trophies Won:

hellfire

Quotehow i can make a messagebox and open a window and such on linux
KDE is based on Qt which is a great (but complex) toolkit.
Challenge Trophies Won:

Ampli

i have kdevelop installed. dont know how to use it yet tho.

LittleWhite

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
The demoscene will never die, never!