Agg:windows on GCC compilation Agg

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.