From owner-freebsd-questions@FreeBSD.ORG  Thu Oct  2 15:45:18 2008
Return-Path: <owner-freebsd-questions@FreeBSD.ORG>
Delivered-To: freebsd-questions@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 56D411065677
	for <freebsd-questions@freebsd.org>;
	Thu,  2 Oct 2008 15:45:18 +0000 (UTC)
	(envelope-from dan@dan.emsphone.com)
Received: from dan.emsphone.com (dan.emsphone.com [199.67.51.101])
	by mx1.freebsd.org (Postfix) with ESMTP id 1A0E48FC21
	for <freebsd-questions@freebsd.org>;
	Thu,  2 Oct 2008 15:45:17 +0000 (UTC)
	(envelope-from dan@dan.emsphone.com)
Received: from dan.emsphone.com (smmsp@localhost [127.0.0.1])
	by dan.emsphone.com (8.14.3/8.14.3) with ESMTP id m92FjF9i079259
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <freebsd-questions@freebsd.org>;
	Thu, 2 Oct 2008 10:45:15 -0500 (CDT)
	(envelope-from dan@dan.emsphone.com)
Received: (from dan@localhost)
	by dan.emsphone.com (8.14.3/8.14.3/Submit) id m92FJlTN097742;
	Thu, 2 Oct 2008 10:19:47 -0500 (CDT) (envelope-from dan)
Date: Thu, 2 Oct 2008 10:19:47 -0500
From: Dan Nelson <dnelson@allantgroup.com>
To: Desmond Chapman <que_deseja@hotmail.com>
Message-ID: <20081002151947.GL86326@dan.emsphone.com>
References: <BLU126-W48A10167A066B5601F1ABEED3D0@phx.gbl>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <BLU126-W48A10167A066B5601F1ABEED3D0@phx.gbl>
X-OS: FreeBSD 7.1-PRERELEASE
User-Agent: Mutt/1.5.18 (2008-05-17)
Cc: vbox-dev@virtualbox.org, freebsd-questions@freebsd.org
Subject: Re: More vbox and build troubles.
X-BeenThere: freebsd-questions@freebsd.org
X-Mailman-Version: 2.1.5
Precedence: list
List-Id: User questions <freebsd-questions.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-questions>
List-Post: <mailto:freebsd-questions@freebsd.org>
List-Help: <mailto:freebsd-questions-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-questions>, 
	<mailto:freebsd-questions-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Thu, 02 Oct 2008 15:45:18 -0000

In the last episode (Oct 02), Desmond Chapman said:
> 
> ***** Checking libpng *****
> compiling the following source file:
> #include <cstdio>
> #include <png.h>
> extern "C" int main(void)
> {
>   printf("found version %s", PNG_LIBPNG_VER_STRING);
> #if PNG_LIBPNG_VER >= 10205
>   printf(", OK.\n");
>   return 0;
> #else
>   printf(", expected version 1.2.5 or higher\n");
>   return 1;
> #endif
> }
> using the following command line:
> g++ -O -Wall -o .tmp_out .tmp_src.cc "-lpng "
> .tmp_src.cc:2:17: error: png.h: No such file or directory
> .tmp_src.cc: In function 'int main()':
> .tmp_src.cc:5: error: 'PNG_LIBPNG_VER_STRING' was not declared in this scope
> 
> 
> I need the headers for this library- libpng-1.2.32. Are they in ports
> as part of another package or do I need to build them? If so, how?

Assuming you have the png port installed, add -I/usr/local/include
-L/usr/local/lib to your compile line.

-- 
	Dan Nelson
	dnelson@allantgroup.com