Code Builder Path
In this example, we assume that your .cpp files, .h header file and Origin C Workspace file .OCW file are all stored in the directory:
See Origin C - Getting Started for an example of how to create a library of C functions.
Make sure that the Origin application is not running. Next, you will need to find the Origin.ini file. The location of this file varies depending upon the directory path that you chose when you loaded Origin. Usually, the directory ends with ...\OriginData\.
Open the Origin.ini file using a text editor such as MS Notepad and search for [OriginC]. Note that you should open Notepad as an administrator in order to be able to save changes. To do so, right click the Notepad application and click on the "Run as Administrator" menu item. Your user account on Windows 7 must have administrative privileges for this to work. Right after [OriginC] add the two lines:
The "WorkspaceFile=" indicates the path where your workspace is saved. "LibraryWorkspace.ocw" is the filename of the Origin C workspace. "BuildOnStart=1" directs Origin to compile your code and building your library upon opening Origin, making it available for immediate use. With "BuildOnStart=0" your custom C library will NOT compile at startup.
When you are done, the [OriginC] part of your Origin.ini file should look something like this:
;1 = build on startup, 0 to disable, -1 to disable system files compilation and precompiled header
Note that lines preceded by ";" are not executed.
Save and close the Origin.ini file. When you open Origin, your library will be available for immediate use.