Create Your First Project

HOOPS Exchange is an explicitly load dynamic C library. This means that the main binary file is programmatically loaded at runtime from user code. In concrete words, that implied the following:

  • At compile time, your compiler only needs to know the location of header files (include/ folder)

  • At link time, nothing is necessary

  • At run time, your environment needs to know the location of the binaries (bin/ sub-folder)

The following sections provide the most standard ways to prepare your environment for an new HOOPS Exchange application.

Prerequisites

First, make sure you have correctly set up your environment.

Todo

Create the Visual Studio (Windows) section about Prerequisites

Creating the Project

Todo

Create the Visual Studio (Windows) section about Creating the Project

The Source File

Open main.c from our text editor and write the following content:

#include <stdio.h>

#include <A3DSDKLoader.h>

int main(int argc, char* argv[])
{
    if(A3DSDKLoadLibraryA(EXCHANGE_BINARY_DIR)) {
        A3DInt32 major, minor;
        A3DDllGetVersion(&major, &minor);
        printf("HOOPS Exchange %d.%d loaded\n", major, minor);
        A3DSDKUnloadLibrary();
    }

    return 0;
}

Build and Run

Todo

Create the Visual Studio (Windows) section about Build and Run

Upon running your program, you should see Exchange version appearing in the standard output.

Todo

Display a screenshot of the expected result