Re: [GD-DEVEL] Compiling libgd on WinXP/MinGW/MSYS
[email protected] ("Pierre Joye")
| Newsgroups | php.gd.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! On Feb 18, 2008 4:08 AM, JA Robson <[email protected]> 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