Putting it all together in an application
This is how we put it all together in an application:
https://github.com/eliotmuirgrid/core/blob/main/make/makefile.core - core make file
https://github.com/eliotmuirgrid/core/blob/main/COLtest/makefile - a makefile which we define for a test application
On a Mac you need to have installed the Xcode tools. Then you can do:
git clone git@github.com:eliotmuirgrid/core.git
From the Mac terminal you can go into the https://github.com/eliotmuirgrid/core/tree/main/COLtest directory where you can type make test, you should see something like this:
cc -I../ -c main.cpp -o main.o
cc -c -o ../LUA/LUAhello.o ../LUA/LUAhello.c
cc -I../ -c ../COL/COLstring.cpp -o ../COL/COLstring.o
cc -c -o ../COL/blah.o ../COL/blah.c
llvm-g++ main.o ../LUA/LUAhello.o ../COL/COLstring.o ../COL/blah.o -o test
Eliots-MacBook-Pro-2:COLtest eliotmuir$ ./test
The answer to life the universe and everything is 42.
Eliots-MacBook-Pro-2:COLtest eliotmuir$
To understand how it works you’ll need to be comfortable with build concepts. Also C linkage.