Update: Re: errors linking to library

Mathew Yeates myeates@jpl.nasa.gov
Tue Oct 17 14:02:00 GMT 2006


I see that in mingw/studio.h (included by unix.c in libgfortran/io)
-------------------------------------
#ifndef __DECLSPEC_SUPPORTED
extern FILE (*_imp___iob)[];    /* A pointer to an array of FILE */
#define _iob    (*_imp___iob)    /* An array of FILE */
#else /* __DECLSPEC_SUPPORTED */
__MINGW_IMPORT FILE _iob[];    /* An array of FILE imported from DLL. */
#endif /* __DECLSPEC_SUPPORTED */
------------------------------------
and MINGW_IMPORT is defined in mingw/_mingw.h as __declspec(dllimport) 
in some cases.


The Microsoft help page said
"declspec(dllimport) 
<http://msdn2.microsoft.com/en-us/library/3y1sfaz2.aspx> was specified 
for a symbol even though the symbol is defined locally. Remove the 
*__declspec* modifier to resolve this warning.
"

So maybe when you compile unix.c you need to specify some flag????

Mathew

p.s. I also see
libgfortran.a(environ.o) : warning LNK4217: locally defined symbol 
__pctype impo
rted in function _init_mem
libgfortran.a(environ.o) : warning LNK4217: locally defined symbol 
___mb_cur_max
 imported in function _init_mem





More information about the Fortran mailing list