Creo Object TOOLKIT C++ Library Types
This section describes the various libraries available in a Creo Object TOOLKIT C++ installation.
Overview
The libraries available in a Creo Object TOOLKIT C++ installation have been classified under:
From Creo 4.0 F000 onward, the libraries listed in the following table are no longer supported and will not be available with the software. The New Library Name column provides a list of the equivalent libraries that are now available. Apart from the compatibility issues explained in the section Version Compatibility: Creo Parametric and Creo Object TOOLKIT C++, applications based on Creo 3.0 and previous versions will continue to run successfully with Creo 4.0.
Old Library Name
New Library Name
protk_dll.lib
protk_dll_NU.lib
protoolkit.lib
protoolkit_NU.lib
protk_dllmd.lib
protk_dllmd_NU.lib
protkmd.lib
protkmd_NU.lib
Linking the Applications
Before you run an existing application in Creo Parametric 8.0, link it to the new libraries and the import libraries: ucore.lib and udata.lib. The new libraries do not link the application to the Unicode libraries but use ucore.lib and udata.lib at runtime to resolve the Unicode dependencies, which also reduces the size of the application. Since these libraries are import libraries, the application must resolve Unicode dependencies at runtime by loading the actual libraries ucore64.dll and udata64.dll. These dlls are located at <creo_load_point>/Common Files/<platform>/obj and <creo_load_point>/Common Files/<platform>/lib.
For synchronous applications, the references to ucore64.dll and udata64.dll are resolved by Creo Parametric when the application is started.
For asynchronous applications, these references must be resolved by the application. For linking asynchronous applications, add the path where the dlls ucore64.dll and udata64.dll are located, that is <creo_load_point>/Common Files/<platform>/lib to the environment variable PATH.
All the sample makefiles available with Creo Object TOOLKIT C++ use the new libraries. For instance, the sample example make_otk_examples created for Creo Object TOOLKIT C++ applications contains information on how to use protk_dll_NU.lib. The sample file is located at <creo_otk_loadpoint>/<platform>/obj.
Standard Libraries
Creo Object TOOLKIT C++ applications will be linked with the following libraries:
Library Name
Purpose
protoolkit_NU.lib otk_cpp.lib ucore.lib udata.lib
Spawn mode library
pt_asynchronous.lib protoolkit_NU.lib otk_cpp_async.lib
Asynchronous mode library
protk_dll_NU.lib otk_cpp.lib ucore.lib udata.lib
DLL mode library
otk_222.lib
If you have the advanced license option 222, include this library in your application.
otk_no222.lib
If you do not have the advanced license option 222, include this library in your application.
A specific platform will also require various system libraries in the application link list. Please refer to the makefiles in the folder <creo_otk_loadpoint_app>\<platform>\obj.
Alternate Libraries
Creo Object TOOLKIT C++ provides alternate libraries, otk_cpp_md.lib and otk_cpp_async_md.lib that may be used for applications compiled with /MD flag and built with msvcrt.lib. These libraries must be used together with alternate libraries from Creo TOOLKIT:
•  otk_cpp_md.lib with protkmd.lib for IPC mode
•  protk_dllmd_NU.lib for DLL mode,
•  otk_cpp_async_md.lib with ptasyncmd.lib and protkmd_NU.lib
Makefile make_otk_examples_md shows how to use the library otk_cpp_md.lib and make_otk_async_examples_md shows how to use otk_cpp_async_md.lib.
Note
•  Although /MD provides compatibility with multi-threaded components, Creo Object TOOLKIT C++ calls must be made within a single thread. Creo does not respond to calls made from multiple threads. Extra threads may be created by applications only to do tasks which do not directly call Creo Object TOOLKIT C++ functions.
•  Compiling Creo Object TOOLKIT C++ applications with /MTd and /MDd flags is not supported.