> So much easier to make it in a scripting language also which will save a bunch of time and code.
Also because it always has been a bad idea, (and with each passing day it is becoming a worse idea), to assume that a program and its GUI must be co-located on the same machine.
> what easy scripting languages are there that can make a gui and can hook up with C++?
Python has been popular with C++ programmers; it integrates so well with C++ (Cython, Boost Python); and it has a rich collection of cross-platform GUI frameworks. http://wiki.python.org/moin/GuiProgramming
I will second Python for it because of how easy it is to get Python and C++ to cooperate together and because I am biased towards it lately ;p. And if you like Java and want to use Python and Java it provides you with Jython or if C# if your flavor you got IronPython
For example here is a simple Window in Python with Tkinter which is a GUI module for python
1 2 3 4 5 6
from Tkinter import *
root = Tk()
w = Label(root, text="Hello, world!")
w.pack()
root.mainloop()
5 Lines of code and you have a simple window with text written to it.
Or if you like game programming here is a the very basic Windows with a main loop and a drawing a circle to the screen.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
import pygame, sys
from pygame.locals import *
pygame.init()
mainWindow = pygame.display.set_mode((800, 600))
pygame.draw.circle(mainWindow, (255, 0, 0), (300, 50), 20, 0)
while True:
for event in pygame.event.get():
if event.type == QUIT:
pygame.quit()
sys.exit()
pygame.display.update()
Now obviously Python isn't the best choice to do most of your graphics in but it is handy for game logic and other things and combines well with other languages like C++.
Damn 6 lines and you got a window? Sold. So what do i have to download to write c++ and python code together? What all do i have to download period? I would like to build games with python so what would i need for that? can you give me all the links i would need please.
Someone remind me why C++ doesn't define a standard GUI library. It's not 1990 anymore.
Presumably, because there are already plenty of good ones out there. Adding one to the standard would create an enormous amount of work for implementors to do, for relatively little benefit.
Presumably, because there are already plenty of good ones out there. Adding one to the standard would create an enormous amount of work for implementors to do, for relatively little benefit.
Well of course it would make little sense adding such a library now. Now is too late especially considering the current touchscreen craze. Oh well, I'm stopping here so as to not derail the thread.
Damn 6 lines and you got a window? Sold. So what do i have to download to write c++ and python code together? What all do i have to download period? I would like to build games with python so what would i need for that? can you give me all the links i would need please.
Well first I would learn the basics and some advance topics of Python. If you have a good understanding of C++ it shouldn't really be all that hard you basically just need to pick up the syntax of the language and a few new features not found in C++ like List Comprehension and stuff along them lines.
For this I found just going through the tutorials at http://www.codecademy.com/tracks/python was enough. Should only take you a week or less depending how much time you put into it. After that you should have a good understanding of the basics.
Then start looking into the modules of Python and install them. For GUI's I would look at getting Tkinter personally and for games I would look at Pygame . After that just learn what you want to learn.
As for integrating C++ and Python you can checkout here http://docs.python.org/2/extending/extending.html and other documentation on the subject.