GLBasic User Manual

Main sections

REQUIRE

REQURE "external.cpp"



With this command you can advise the compiler to include an additional source code file in the project.
These files will be passed directly to the GCC compiler. As such, the currently supported file formats are C, CPP and (for iPhone) .m / .mm files.

// test1.cpp
#include "glb.h"

int Moo()
{
    STDOUT("Moo\n");
}


// main.gbas
REQUIRE "test1.cpp"
IMPORT int Moo()

Moo()

See also...