Setting Up a GNU Make project (GCC)

This document guides you through the process of creating a new HOOPS Exchange project using GNU Make and GCC.


Check your system documentation to install the make command as well as the base C development tools. Also, make sure your development environment is supported by HOOPS Exchange.


Make a folder for your new project, and create a file called Makefile with the following content:

CC = gcc
PROJECT = ExchangeApplication
SRC = main.c



all: $(PROJECT)

        $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^

        rm -f $(PROJECT)

.PHONY: all clean

Add another file called main.c with the following code:

#include <stdio.h>

#include <A3DSDKLoader.h>

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

    return 0;

Compile And Run

From your command line interface, change to the directory containing your Makefile and run the following command:

make EXCHANGE_INSTALL_DIR=path/to/exchange
  • path/to/exchange is the folder path to your Exchange installation directory (the folder containing include/).

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

You’re ready to jump to our next tutorial: Initializing HOOPS Exchange.