This is the mail archive of the
fortran@gcc.gnu.org
mailing list for the GNU Fortran project.
RE: please help - can't link to a DLL with gfortran
- From: "David Gittins" <dave dot gittins at gmail dot com>
- To: "'Anton Korobeynikov'" <anton at korobeynikov dot info>, <fortran at gcc dot gnu dot org>
- Date: Fri, 14 Nov 2008 07:38:39 -0000
- Subject: RE: please help - can't link to a DLL with gfortran
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:subject:date :message-id:mime-version:content-type:content-transfer-encoding :x-priority:x-msmail-priority:x-mailer:importance:thread-index :in-reply-to:x-mimeole; bh=NEZYX6a/JOxKhhatD7uruKOOd298LScncW4O5WmHqSc=; b=mbJ0Ue9UBFbbrx57iIpMXQKX+mlKYbx/HycnWkZz5IufPqFr1x32JlZo7VDm1zsoDR kQb7gElqE5mxiLS8oRcwBzy6yTA63kV/XVJ7Iou0Kg6Yq4+sASD4v+ai6fP0DGb040Gi xD2b5HfJuRkds0Q3IDLG9kfOpJZQ2fP2Frgs0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:subject:date:message-id:mime-version:content-type :content-transfer-encoding:x-priority:x-msmail-priority:x-mailer :importance:thread-index:in-reply-to:x-mimeole; b=gSzNkm4lQlD/XKQIl1b7ljRc4KiUFexGBZqC/mvTJQlxJ9SkrFA5A77vy5Mb47deDF UoEqvY+z7yDAKy6E4q6/wUDT/uSso27+Ew3MXvCLqTGOoM1cvWdZVYznxyuwe8x96txM tSetSOKObNxw9+u0b7+QIevLNwqeLj2dhWMf4=
Hi,
> Such mangling usually means, that function uses stdcall
> calling convention
> See above, this is not just 'naming issue'.
OK, I believe you.
In which case I am even more confused. CVF managed to figure out, without
any additional information, that these unresolved functions should use
stdcall, and matched them up with the lib.
If this were some C code, I could modify the external function declarations
to tell the compiler that they are stdcall, right? But in fortran, my
declaration is just 'external'. Is there no way to tell the compiler to use
stdcall convention for them?
External constraints mean that for my situation to work, I need to be able
to compile with only the netcdf files I've been given - I don't have the
option to compile it myself or get another version.
But suppose I did recompile netcdf with gcc (the source is in C I think).
Presumably, the result would still be a library expecting its functions to
be called using stdcall. So surely I would still have a similar problem: how
to tell gfortran that by 'external' I really mean 'external, stdcall, it's
in this DLL here'?
Dave