Setting Up the C++ Environment

When deploying component interfaces on a local client machine with C++ bindings, you must have:

  • The third-party C++ application.

  • The Application server and database.

  • The Java Virtual Machine (JVM) supplied with the Sun Microsystems Java Development Kit (JDK) found in the %PS_HOME%\JRE directory.

  • Your compiler, configured for the C++ project.

Third-Party Applications

For applications written in C or C++, note that:

  • The function names generated by the Build APIs process can be quite long. You may want to consider creating classes within your C++ code to mask this length throughout your program.

  • When you create your installation for your C or C++ program, make sure that you include the setup of the path to the psapiadapter.dll.

To set up your client machine to access the component interface API using C++:

  1. Install the PeopleSoft File Server.

    See PeopleSoft Installation Guide, “Using the PeopleSoft Installer.”

  2. Set the environment variable PS_HOME to point to the installed PeopleSoft PeopleTools directory (for example, c:\pt854).

  3. Set the environment variable PATH to include the directory containing jvm.dll and the directory containing the PeopleTools client binaries.

    For example, %PS_HOME%\bin\client\winx86; or, if the PeopleTools installation is done locally, the path is <PS_HOME>\jre\bin\client.

  4. Install the JVM supplied with the Sun Microsystems JDK. The JVM is located in the %PS_HOME%\JRE directory.

  5. Set the environment variable CLASSPATH to include the psjoa.jar file (typically <PS_HOME>\class\psjoa.jar).

To configure a compiler for the C++ project:

Note: These instructions assume that you are using Microsoft Visual C++. If you use a different compiler, apply the equivalent settings for that product.

  1. Create a new project in Microsoft Visual C++.

  2. Select Tools > Options.

  3. Select the Directories tab.

  4. Click the New button in the Options dialog box.

  5. Enter the path to the SDK include files, for example:

    C:\PT840\SDK\PSCOMPINTFC\SRC\C++\SAMPLES\INC
  6. Click OK to save the options.

  7. Open the Project Settings dialog box.

  8. Select the C/C++ tab.

  9. Select the General category.

  10. Add PS_WIN32 to the preprocessor definitions.

  11. Select the Link tab.

  12. Select the Input category.

  13. Specify the full path to psapiadapter.lib for the Object/library modules.

    This is typically <PS_HOME>\src\lib\psapiadapter.lib. Make sure that this is the only entry for psapiadapter.lib.

  14. Click OK to save the settings.