Page 1 of 1

Getting started

Posted: 29 Mar 2014, 06:44
by freestyler
I have been playing around a bit with gtkdialog lately and now I am looking into developing "real" applications.
Can anyone give me a heads up on what would be the best language to use and what software I should use to make it? I have dabbled with qtcreator and kdialog before but want to move towards something more universal for linux.

Re: Getting started

Posted: 02 Apr 2014, 02:44
by brokenman
I would have to recommend C++ as a base. It is the underlying layer of most applications. Apart from that perhaps qt or gtk which are both widely used among unices and plenty of IDE's support this.

Re: Getting started

Posted: 02 Apr 2014, 05:44
by freestyler
Cheers brokenman, that's what I thought. Just started learning about c++, it's pretty awesome stuff. Also stated messing around with glade. Since I got porteus I'm becoming such a geek :)

Re: Getting started

Posted: 04 Apr 2014, 12:52
by RamonTavarez
1.- What about CLANG and LLVM?

2.- Is there an IDE that works with it?

Re: Getting started

Posted: 15 May 2014, 18:48
by sabir
freestyler wrote:I have been playing around a bit with gtkdialog lately and now I am looking into developing "real" applications.
Can anyone give me a heads up on what would be the best language to use and what software I should use to make it? I have dabbled with qtcreator and kdialog before but want to move towards something more universal for linux.
The best way for:
Windows: WinAsm + win32api (http://www.winasm.net/)
Linux: C + system calls(http://www.opennet.ru/man_2_eng.shtml) + libc(http://www.opennet.ru/man_3_eng.shtml) + Xlib(http://tronche.com/gui/x/xlib/)

For example (Linux):

//------------------------------------------------------------------------------------------
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <X11/Xlib.h>

int main()
{
Display *dsp;
XSetWindowAttributes att;
Window win;
unsigned long mask;
int screen;
int width = 640;
int height = 480;

if((dsp = XOpenDisplay(NULL)) == NULL)
{
fprintf(stderr, "Could not open display.\n");
exit(0);
}

screen = XDefaultScreen(dsp);

att.event_mask = ExposureMask|ButtonPressMask|ButtonReleaseMask|KeyPressMask;
att.background_pixel = XWhitePixel(dsp, screen);
att.border_pixel = XBlackPixel(dsp, screen);
mask = CWEventMask|CWBackPixel|CWBorderPixel;
win = XCreateWindow(dsp, XRootWindow(dsp, screen), 0, 0, width, height, 1, CopyFromParent, InputOutput, CopyFromParent, mask, &att);

XMapWindow(dsp, win);
XFlush(dsp);

sleep(10);
XCloseDisplay(dsp);

return 0;
}
//------------------------------------------------------------------------------------------

Save it as main.c and compile with: cc -o main main.c -lX11 :)

Re: Getting started

Posted: 16 May 2014, 02:37
by freestyler
cheers :)