------- Comment #1 from burnus at gcc dot gnu dot org 2009-07-29 07:04 ------- Function declaration
function LoadLibrary(lpFileName) bind(C,name='LoadLibraryA') !gcc$ ATTRIBUTES STDCALL :: LoadLibrary use ISO_C_BINDING ... and use hmodule = LoadLibrary('fun.dll'//achar(0)) ... and dump hmodule = loadlibrary (&"fun.dll"[1]{lb: 1 sz: 1}); Reported error: undefined reference to `loadlibra...@8' For a 32bit system, one expects a single 4-bye pointer and thus @4. However, I do not see any reason why it should be 64bit instead of 32bits. It also cannot be a 64bit Windows as one there does not use STDCALL. -- burnus at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fxcoudert at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40898