Author Topic: Linux  (Read 3655 times)

0 Members and 1 Guest are viewing this topic.

Offline Ampli

  • ZX 81
  • *
  • Posts: 19
  • Karma: 10
    • View Profile
    • StudioRIFF
Linux
« 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. =)

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Linux
« Reply #1 on: November 19, 2008 »
@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?

Code: [Select]
kdialog()
xmessage()
« Last Edit: November 19, 2008 by va!n »
- 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:

Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Linux
« Reply #2 on: November 19, 2008 »
i cant test it.. but hope it works...  docu for something like MsgBox on Win32

Code: [Select]
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:

Offline Ampli

  • ZX 81
  • *
  • Posts: 19
  • Karma: 10
    • View Profile
    • StudioRIFF
Re: Linux
« Reply #3 on: November 19, 2008 »
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.



Offline va!n

  • Pentium
  • *****
  • Posts: 1431
  • Karma: 109
    • View Profile
    • http://www.secretly.de
Re: Linux
« Reply #4 on: November 19, 2008 »
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:

Offline hellfire

  • Sponsor
  • Pentium
  • *******
  • Posts: 1292
  • Karma: 466
    • View Profile
    • my stuff
Re: Linux
« Reply #5 on: November 19, 2008 »
Quote
how 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:

Offline Ampli

  • ZX 81
  • *
  • Posts: 19
  • Karma: 10
    • View Profile
    • StudioRIFF
Re: Linux
« Reply #6 on: November 19, 2008 »
i have kdevelop installed. dont know how to use it yet tho.

Offline LittleWhite

  • Senior Member
  • Amiga 1200
  • ********
  • Posts: 418
  • Karma: 31
  • It's me!
    • View Profile
Re: Linux
« Reply #7 on: November 28, 2008 »
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!