Re: Compiling g2clib

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Dec 02 2013 - 12:51:48 MST

Hi Ben,
One thing I notice immediately is that I think you INC line is wrong. Assuming you are trying to include two directories, each of them must have a separate '-I'. Try;
INC=-I/usr/include -I/usr/local/lib

A further question is are there actually any include files in /usr/local/lib? This would be unusual.
What system are you trying to compile on? On a mac you may need to use -m64 instead of -q64. My suggestion would be to start with as few flags
as possible.
My own successful makefile for g2clib (on a mac) looks like this:


# Please make sure to include all idirectories where include files
# can be found (jasper/*.h and png.h pngconf.h zconf.h zlib.h)


# This "C" source code contains many uses of the C++
# comment style "//". Please make sure you include the
# appropriate compiler flag to allow the use of "//" comment indicators.



I think 'cc' on my machine maps to 'gcc', which by default seems to have no problem with C++ style comments.
Hope this is helpful.

On Dec 1, 2013, at 12:52 PM, Ben Jolly <> wrote:

> Hi
> Im having trouble compiling g2clib as per the instructions at
> I have been following the guide with no problems thus far, however its telling me to change compiler (CC) and flag (CFLAGS) lines but not specifying what to change them to. I had a bit of a play based on hints in the makefile and ended up with:
> INC=-I/usr/include /usr/local/lib
> CFLAGS=-q64 -O3 -qarch=auto -qcpluscmt $(INC) $(DEFS)
> CC=gcc fPIC
> Which failed miserably because q64 was not a valid GCC flag (yes I am building on a 64-bit system). Can anyone push me in the right direction?
> Thanks
> Ben
> This email may be confidential and subject to legal privilege, it may
> not reflect the views of the University of Canterbury, and it is not
> guaranteed to be virus free. If you are not an intended recipient,
> please notify the sender immediately and erase all copies of the message
> and any attachments.
> Please refer to for more
> information.
> _______________________________________________
> pyngl-talk mailing list
> List instructions, subscriber options, unsubscribe:

pyngl-talk mailing list
List instructions, subscriber options, unsubscribe:
Received on Mon Dec 2 12:51:57 2013

This archive was generated by hypermail 2.1.8 : Thu Dec 05 2013 - 11:51:22 MST