This document records the process of compiling Agg2.5 with TDM64-GCC (MINGGW variant). Operating system win8.1 64-bit, compiler TDM64-GCC.
First, TDM64-GCC only provides a set of compilation environments, and some POSIX commands are not provided, such as LS,RM, etc., the simple way is to install Git, there is an option to provide these tools. Unzip the agg2.5, copy the makefile.in.mingw32_nt-5.1, rename it to makefile.in.mingw32_nt-6.1, and then compile directly to:
CD agg-2.5 make
Because it is a 64-bit compiler, after compiling, the later Platform_support can not be compiled, so it is best to add-m32 compilation options. Modify Src/makefile, add-m32 after Cxxflags:
Cxxflags= $ (aggcxxflags)-I.. /include-l./-m32
Recompile again:
CD agg-2.5 make clean make
After compiling this, SRC will get libagg.a, create a new directory, copy the include, and build a Lib directory, put Libagg.a in.
Let's compile an example to try it out:
Copy examples under the Bezier_div.cpp out, and Src/platform_support/win32 under the two CPP file out, create a new makefile:
Objs = bezier_div= g++=-W-=-lagg-=-i./agg/= -l./agg/ = Agg.exeall : $ (OBJS) -o $ (obj_name) Clean: -F *.o *.exe
Here Platform_support as the code of their own project added to compile, while compiling, you need to specify the-M32 option compiled to 32-bit programs, and Link GDI32 library. The results are as follows:
Agg:windows on GCC compilation Agg