libgdi32.a missing on windows

1,625 views
Skip to first unread message

Eric Lavigne

unread,
May 19, 2005, 6:36:23 PM5/19/05
to gg...@googlegroups.com
I am trying to use the dislin library from www.dislin.de. I have
installed a version of that library that is specifically designed for
g95. When I try to compile an example code, I get an error about a
missing library: -lgdi32

This program uses two libraries: gdi32 and user32. Both of these are
available as dlls on my system (Windows XP), but I assume g95 can't see
those. There is a file libuser32.a in c:\g95\lib\ but there is no
libgdi32.lib.

My g95 is a recent binary from g95.org:
Windows x86 Binary (2005-05-10 19:36) Self-extracting g95 for Windows
(MinGW)

Any ideas for how I can obtain the missing library gdi32?

Doug

unread,
May 19, 2005, 7:03:14 PM5/19/05
to gg...@googlegroups.com

I have put a copy of the file here, that you can download:
http://vinyl2.sentex.net/~tcc/g95/libgdi32.a

I will include it in the next build.

Doug

Mark Hadfield

unread,
May 19, 2005, 7:31:13 PM5/19/05
to gg...@googlegroups.com

I have a libgdi32.a on my system, in C:\MinGW\lib. IIRC the G95
installation program notes that it can make use of MinGW libraries and
should be installed into the MinGW directory if that is available.

I suggest you remove G95 from your system, install MinGW, then
re-install G95 into the MinGW directory.

MinGW is at http://mingw.sourceforge.net/. Sorry, I'm not sure what
packages you will need, but this one would be a good start...

http://prdownloads.sf.net/mingw/MinGW-3.1.0-1.exe?download

Alternatively there is a new installer under development and accessible
via a link from the front page. You might like to try this, if you're
felling brave.

Eric Lavigne

unread,
May 19, 2005, 9:40:47 PM5/19/05
to gg...@googlegroups.com
>> Any ideas for how I can obtain the missing library gdi32?

>I have put a copy of the file here, that you can download:
>http://vinyl2.sentex.net/~tcc/g95/libgdi32.a

>I will include it in the next build.

>Doug

Thanks for the file. This fixed the immediate problem, but another
followed:
c:\dislin\disg95.a(disini.o)(.text+0x100f):disini.c: undefined
reference to `_impure_ptr'

I already fixed this problem, but I will explain further in case anyone
else is interested.

disg95.a is a prebuilt library that came with dislin. I'm guessing that
mingw/g95 and cygwin/g95 libraries are not compatible, so I tried
reinstalling g95 with the cygwin binary (and pulling disg95.a from
cygwin's w32api package). I still get an error message, but the program
basically works this time:
Info: resolving __impure_ptr by linking to __imp___impure_ptr
(auto-import)

Here is a part of the dislin readme file that I didn't notice. It
doesn't really say that I need the cygwin version of g95, but it does
hint in that direction. It also tells me that I need to go find gdi32
on my own.
- DISLIN needs the library libgdi32.a for linking that is not
included in the g95 distribution. The library is available
from the site www.cygwin.com in the w32api package.
You can copy libgdi32.a to the installation directory of
G95.

Reply all
Reply to author
Forward
0 new messages