4.1.4.2 Using the Open Watcom IDE to Build a Resource-only DLL
It is possible to open a resource in Origin created using a resource editor/compiler other than Microsoft Visual C++. The topics in this section describe how to build a Dialog Builder resource using Open Watcom C/C++ v1.2 and access it in Origin with Origin C. The following sample files are shipped with Origin and can be compiled by Open Watcom C/C++ to create a resource-only DLL that is accessible in Origin. The Open Watcom C/C++ software is not owned or distributed by OriginLab Corporation. To find out more about Open Watcom C/C++ and to download a copy please visit http://www.openwatcom.org/.
The following sample files are required by this example and can be found in this zip file, under the \Dialog Builder\TempConv subfolder.
| File | Description |
|---|---|
| TempConv.wpj | Open Watcom project file. |
| TempConv.tgt | Open Watcom target file. |
| TempConvDlg.res | Open Watcom resource script file. |
| dllmain.c | Open Watcom source file. |
| TempConvDlg.ocw | Origin C workspace file. |
| TempConvDlg.cpp | Origin C source file for handling the dialog. |
| resource.h | Header file containing IDs for the dialog and its controls. This is used both by Open Watcom and by Origin C. |
Follow the steps below to build a Temperature Converter DLL using Open Watcom C/C++.
- Obtain and install a copy of Open Watcom C/C++ v1.2.
- Launch the Open Watcom IDE.
- Select the File|Open Project... menu item in Open Watcom. Browse to and open the sample Watcom project file TempConv.wpj found in this zip file, under the \Dialog Builder\TempConv subfolder.
- Select the Actions|Make all menu item in Open Watcom to compile and link the resource-only DLL.
A resource-only DLL named TempConv.DLL is created in the same folder as the sample files. See the next topic Accessing an Open Watcom Resource-only DLL with Origin C to learn how to open and access the resource in Origin.