Hosted by

|
- Setting up environment variables
For building OWLNext applications I recommend to set the environment variable
OWLROOT to point to the root folder where OWLNext files are installed. An advantage of
using this environment variable is that projects are easily transferred from one computer to another without
having to modify the project files.
OWLROOT is created/updated by running the
OWLNext Setup but
you have the option to set it manually, see:
Setting up environment variables under Windows 2000/XP
.
- Starting a new OWLNext project
From the menu File->New->Other choose to create a new Console Application.
In the New Console Application dialog uncheck the Use VCL and Console Application checkboxes:

If you have OWLNext wizard addOn for CBuilder, you can go to
File->New->Other and chose OWLNext project wich will start
the Wizard to create an OWLNext project.
-
Setting project options
If you didn't use the OWLNext Wizard (ie, you
are creating a project for pre-existing OWLNext files), just go
to Project->Options and select the
'Base' Build configuration. After that just go to 'Directories
and Conditionales' page:
For the include directories add $(OWLROOT)\include; and
for the library directories: $(OWLROOT)\lib;
If you want to use dynamic linking, add the
conditional define _OWLDLL.
If you want to use UNICODE version, add
UNICODE to
the conditional defines and also select _TCHAR maps to UNICODE.
If you want to use static linking for OWLNext library (which is
recommended), go to C++ Linker page and
set the Dynamic RTL to
false:
Finally, ensure that in the
C++Compiler/General Compilation page the option Integer-sized
enums is turned on.
That's all!
If you want to test if everything is
set up correctly, open the created .cpp file for the project and
replace it's contents with the following code:
//-----------------------------------------------------------------------
// ObjectWindows - (C) Copyright 1991, 2010 by Codegear
// Tutorial application -- step01.cpp
//-----------------------------------------------------------------------
#include <owl/applicat.h>
#include <owl/framewin.h>
class TDrawApp : public TApplication
{
public:
TDrawApp() : TApplication() {}
void InitMainWindow()
{
SetMainWindow(new TFrameWindow(0, "Sample OWLNext Program"));
}
};
int
OwlMain(int /* argc */, char* /* argv */ [])
{
return TDrawApp().Run();
}
-
Build and run the application. It should show an empty window
with the caption Sample OWLNext
Program.
-
Adding empty OWLNext application project to the project
repository
For easier creation of OWLNext application in the future, this
sample project can be added to the project repository. Simply
delete the .cpp file, and select the menu item Project->Add to
Repository. In the dialog select appropriate category and fill
the Title, Description and Author fields:

|