Re: [GD-DEVEL] Compiling libgd on WinXP/MinGW/MSYS

From: Date: Tue, 19 Feb 2008 14:27:53 +0000
Subject: Re: [GD-DEVEL] Compiling libgd on WinXP/MinGW/MSYS
References: 1  Groups: php.gd.devel 
Request: Send a blank email to php-gd-devel+get-368@lists.php.net to get a copy of this message
Hi! On Feb 18, 2008 4:08 AM, JA Robson <arbingersys@gmail.com> wrote: > I have a WinXP machine running MinGW/MSYS, and I was having a tough > time getting libgd to compile. The message "symbol lacks external > linkage" kept popping up. I did some poking around on the Internet and > found that it had something do with the 'dllimport' attribute on > function calls. > > > http://www.google.com/search?ie=UTF-8&oe=utf-8&q=%22symbol+lacks+external+linkage%22&qt_s=Search&sa=N&tab=gw > > I eventually landed here -- > > http://www.phpman.info/index.php/info/gcc > > -- and after some tinkering, made a little hack that worked to get it > to compile. I can't really explain why it works (my notion of vtables > and system handling of library function export/imports is hazy, I'm > afraid), but I thought it might be useful to note for users building > libgd with this particular config. Also, I thought the maintainers may > have a clearer idea about what's going on, and provide a better hack > to accommodate the MinGW environments. > > My hack was as follows: Why not call the build with BGDWIN32 and/or DLL? It will have the same effect. The problem with your solution is to do not allow NONDLL in mingw. Have you tried to build GD using cmake? CMake supports mingw and our cmake scripts work well on windows (I use VC) Cheers, -- Pierre http://blog.thepimp.net | http://www.libgd.org

« previous php.gd.devel (#368) next »