Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 12-06-2006, 11:22 PM   #1
Registered: Dec 2003
Location: Long Beach, CA
Distribution: haven't settled on one.
Posts: 251

Rep: Reputation: 30
where is information/howto for building a project


I'm interested in writing a small project for the sake of learning how to do it. I would like to use c++ and glade.

I've been downloading source code for other projects as reference and would like to know a few things.

- what are *.h header files? Are they written or generated?
- I can't find a main or parent *.cpp file for running the application in any of the source code that I've downloaded (inkscape and ktoon). Is there a main file? Where should I be looking for it? If there is not a main file, how does the application know what to do when it is started?
- I'm not able to find any file(s) containing window or gui information. Should there be a file there? What should I be looking for? How is the gui generated?

Thanks for any information that you might provide related to these or any other things that I ought to know about.
Old 12-07-2006, 12:23 AM   #2
Penguin of Wonder
Senior Member
Registered: Sep 2005
Location: West Virginia
Distribution: Gentoo
Posts: 1,249

Rep: Reputation: 45
Header files in C++ are written by you. They generally contain your classes and such. Helps the keep the code organized as opposed to having a GIANT main.cpp.

There isn't always a main.cpp. Well, there is a cpp file that starts the program, but its rarely called main in real programs. At least the program I've looked through the code for.

There are files that contain the GUI information, though I don't know where they're at or what they're called. Outside of VB I've never actually coded a GUI.

How familiar are you with C++ and programming in general? I think it would be best if you stepped back and looked at some simpler code. Taking a course or buying a book would a nice start.
Old 12-07-2006, 12:34 AM   #3
Senior Member
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
If you're not familar with C++, I would urge you to consider another language to start with. C++ is a very complex language, and the learning curve may be a little daunting.

If you are certain you want to use C++, try looking at simpler examples than inkscape (I'm not sure about ktoon). This is a pretty big app, and you'll quickly get lost in the code if you're not careful.
Old 12-07-2006, 04:01 AM   #4
Registered: Dec 2003
Location: Long Beach, CA
Distribution: haven't settled on one.
Posts: 251

Original Poster
Rep: Reputation: 30
Thanks for the responses.

I am familiar with c++ to the extend that I have taken a class in it. The problem is that I've only written one file for each program that I've written. In order to get the 'real world' c++ experience I want to make something larger. I have written some small c++ files that use glade/gladmm to create an interface. These only consist of one file, and so I haven't invested any time in tying the event-handlers to any process. I understand how that works and I just want to know the answers to these other questions.

I do understand inkscape's and ktoon's code. I need to know where the parent/main file is that is, the one that is calling the various classes and functions, in order to _fully_ understand how everything is working. **edit, I found inkscapes main *.cpp file. It resides as src/application/application.cpp

Now I just need to know more about how the gui is being generated. obviously inkscape does not use glade.

Last edited by fatblueduck; 12-07-2006 at 04:15 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Linux Information Project defends Novell-Microsoft pact LXer Syndicated Linux News 0 12-05-2006 01:03 PM
I am building a workstation from scratch and need information astender Linux - Hardware 15 05-06-2006 11:03 PM
about .map file and building project on Linux George2 Programming 10 05-03-2006 02:40 AM
Information about building a network server and the right programs Blackharaz Linux - General 3 04-29-2005 03:14 PM
Building project jvmaccess error in compiling OpenOffice subirbp Debian 0 11-23-2004 05:05 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 01:31 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration