Warning - this article is based on Optima++ 1.5. I am not positive that every detail is the same for Power++ 2.x (although I did check it against a beta version of 2.0 that we had at the office). If anyone notices any discrepancies, please email me at dosten(at)earthlink.net and I will post the corrections.
This week I will begin a series on the organisation of Power++ projects. I will discuss the different file types. I will also go into sharing code (especially classes and code files) and my own ad hoc version control.
Note that most of this information is also found in the "Programmer's Guide."
The main unit of organisation in Power++ is the "project". A project may contain one or more "targets". A target can be an executable, a DLL, or other type (web server module, etc.). I will concentrate on exe and DLL files since they are the most common.
If you look in the folder for a project, you will see many different kinds of files. There are many that are specific to Power++ that it uses to keep track of targets and projects. There will be others as well that are standard file types (such as .ico, .hpp, and shortcuts).
You only need the .wxp and .wxu files; all others are for targets.
There are some specific files that are common to most targets:
There will also be at least two sub-folders in the project folder: "Debug" and "Release". These two folders are created for each target in the project. They contain the actual source (.cpp, .hpp) and object (.obj) files generated when you compile a target. After a successful compilation, there will also be the final target file (.exe, .dll, etc.). These files are all generated automatically by Power++ and should not be edited. When you select Run Clean, these files are deleted. Note that most files are always in the Release folder, even if you are working on a debug version.
Backup files - Power++ makes backup copies of some files. Any file with a tilde (~) in the extension is a backup copy.
The "Programmer's Guide" contains some information on project folders, target folders, etc., but I will give a quick summary. Project are stored in project folders. Targets are stored in target folders. Pretty straightforward. However, when you start a new project, you will notice that Power++ did not create a separate folder for the target you selected; it assumed that your project and target are synonymous. Even if this is the case, there are several reason why I don't like this. One, if you want to save a copy of the project (using Save As) you will have the change the name of the target. Second, if each target is in is own folder, it is very easy to tell the targets for a project. This is especially helpful if you deal with many projects at a time. Each new target you add will have its own folder, but for the initial target, simply delete it right after you create a new project and create another one. Also if you don't a windows exe, which is the default target, you must do this procedure.
Next, I will go over how to share files (classes and source code) among different projects.