[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] What's wrong in compiling libpng

From: Lee David O'Dea
Subject: Re: [Tinycc-devel] What's wrong in compiling libpng
Date: Sat, 14 Jul 2018 12:44:12 +0000

You have a comma after void (“void,”), which Must be causing the error:


typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));





Lee David O'Dea


From: Tinycc-devel <tinycc-devel-bounces+address@hidden> on behalf of address@hidden <address@hidden>
Sent: Friday, July 13, 2018 5:00:24 PM
To: address@hidden
Subject: Tinycc-devel Digest, Vol 183, Issue 7
Send Tinycc-devel mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Tinycc-devel digest..."

Today's Topics:

   1. Build libpng with tcc (Evgeny Nikonov)
   2. Re: Build libpng with tcc (Daniel Gl?ckner)


Message: 1
Date: Thu, 12 Jul 2018 20:46:54 +0300
From: Evgeny Nikonov <address@hidden>
To: address@hidden
Subject: [Tinycc-devel] Build libpng with tcc
Message-ID: <address@hidden>
Content-Type: text/plain; charset="utf-8"

Hello everybody.

OS: Windows 7 x64 (but problem is independent from OS)
Version tcc: 0.9.26
Version libpng: 1.6.34

When I try to compile liblary from source with tcc I encounter with problem on preprocessor step (I suspect so).
All c-files includes pngpriv.h; pngpriv.h includes png.h where defined similarly strings, for example:

typedef PNG_CALLBACK(void, *png_error_ptr, (png_structp, png_const_charp));

png.h includes pngconf.h where PNG_CALLBACK macros is defined as:

define PNG_CALLBACK(type, name, args) type (PNGCBAPI name) PNGARG(args)
PNGCBAPI is _cdecl or __stdcall
define PNGARG(arglist) arglist

As can you see there are no syntax error.?GCC compilation had done OK. But tcc write in stderr that ')' expected (got '*') (in png.h:806).
Compilation one c-file (for example png.c) was done command:
tcc -c -Wall -IC:\tcc\include\zlib png.c

What's wrong?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nongnu.org/archive/html/tinycc-devel/attachments/20180712/6d2e305a/attachment.html>


Message: 2
Date: Thu, 12 Jul 2018 22:55:57 +0200
From: Daniel Gl?ckner <address@hidden>
To: Evgeny Nikonov <address@hidden>, address@hidden
Subject: Re: [Tinycc-devel] Build libpng with tcc
Message-ID: <address@hidden>
Content-Type: text/plain; charset=us-ascii

On Thu, Jul 12, 2018 at 08:46:54PM +0300, Evgeny Nikonov wrote:
> PNGCBAPI is _cdecl or __stdcall

> What's wrong?

_mingw.h contains only a definition for __cdecl, not for _cdecl.
And I guess you either didn't try __stdcall or _mingw.h is not

Best regards,



Subject: Digest Footer

Tinycc-devel mailing list


End of Tinycc-devel Digest, Vol 183, Issue 7

reply via email to

[Prev in Thread] Current Thread [Next in Thread]