News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

Help with LibGD

Started by Mario, May 31, 2007, 07:57:03 PM

Previous topic - Next topic

Mario

How to use LibGD (http://www.libgd.org) with PellesC?
I do not succeed in getting the lib from the Dll, can you help me?
Thx
Mario

koala


I have the same problem, some solution?

(Compilation run fine, but on run some gd functions like gdImageJpeg cause segmentation fault)

Meanwhile i use PellesC to write code and mingw to compile.

Thank You


frankie

Problem due to the wrong calling convention.
Define the symbol 'WIN32' in your projects.
From ide menu project->project_options->compiler add 'WIN32' in the symbol's define box.
From command line use switch '/D' to define symbol 'WIN32'.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

koala

I tried, but i have same problem.

On menu project->project_options->compiler  at the bottom, now appears:

Comand line options: (CCFLAGS)
-Tx86-coff -Ot -W1 -Gz -Ze -DWIN32

is all right?

Thank You

frankie

#4
Ok the problem is the incompatibility of PellesC and M$ file I/O approach.
To use the precompiled dll you have to omit the default libraries and link the msvcrt.lib instead.
Please look at the attached sample.
"It is better to be hated for what you are than to be loved for what you are not." - Andre Gide

koala


It's working fine!!!!


Thank You