Results 1 to 3 of 3
I decided, as a project of mine, to create a small computer that could link up to a small display. Because the computer is very low-powered, guess what OS I ...
- 04-21-2010 #1Just Joined!
- Join Date
- Apr 2010
- Location
- Weare, NH
- Posts
- 5
New to Linux Programming (C++)
I decided, as a project of mine, to create a small computer that could link up to a small display. Because the computer is very low-powered, guess what OS I decided to use? Linux... Ubuntu to be specific.
Anyway, I come from using Xcode on OSX (very user-friendly compiler) and some tools for GUI and scripting development. That's where the problem comes in.
I know C++, but I do not know how specifically Linux handles programming. I have the GCC compiler installed, and I know the terminal command to compile, but I have a few questions:
1. How do I link to different APIs (like OpenGL)
2. When I compile multiple files, do I compile the main .cpp/.cc file? Or is there a project file I use.
3. Is there a way to make GUIs easily in Linux? I was looking at the 'QT 4' tools.
4. What do the 'QT 4' tools do specifically?
5. Any good IDE? I am using 'Kate' at the moment, but I am not sure how it compares to other programs.
6. Any other tips? Pitfalls to watch out for? Hints to program quicker? Other software I could use?
- 04-22-2010 #2Linux User
- Join Date
- Jan 2006
- Posts
- 414
mostly it's just an argument to the compiler/linker "-lgl" would be used for opengl for example. Most libraries will tell you what to use when compiling.
take a look at make: Make - a tutorial2. When I compile multiple files, do I compile the main .cpp/.cc file? Or is there a project file I use.
I don't really know qt, my preference has always been gtk... but then I prefer C to C++3. Is there a way to make GUIs easily in Linux? I was looking at the 'QT 4' tools.
4. What do the 'QT 4' tools do specifically?
GTK+ 2.0 Tutorial
I suggest geamy, it's simple, yet does just about everything you'll need: Geany : Home Page5. Any good IDE? I am using 'Kate' at the moment, but I am not sure how it compares to other programs.
- 04-22-2010 #3Just Joined!
- Join Date
- Apr 2010
- Posts
- 10
Qt has some tools that make it easier to handle GUI programming. The advantage of using Qt ist, that you have a platform independent project file.What do the 'QT 4' tools do specifically?
A tool named qmakes takes it and generates a Makefile.
So you can normally compile your application on different plattforms without additional work.
An additional tool is the moc (meta object compiler). This tool is automatically called by qmake and is needed for introspection respective the signals and slots mechanism. That is the mechansim to make a communication between objects possible. The next important feature is the uic (user inteface compiler). With the QtDesigner (delivered with the QtCreator - in my opinion the best IDE
) it is possible to design GUIs just by composing widgets. Then you can save this as an ui-File - this is a simple XML file which contains the properties of your GUI. This is used to create a source file (using the uic), which can be included into your project. So you can access each widget directly in your source code and change the arrangement of your widget without changing something in your code.
A further advantage of Qt is the huge amount of classes for everything (db access, XML, ECMA, Networkprogramming, Multithreading, a lot of container classes, OpenGL, and so on... ). All classes are very well documented (in the most cases with little programming examples).
I can recommend the QtCreator. It is a very fast and powerful tool. You can download the full SDK @ qt.nokia homepage.Any good IDE? I am using 'Kate' at the moment, but I am not sure how it compares to other programs.


Reply With Quote
