- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have a fortran main program that call the 'atof' c function.
program Console1implicit noneinterfacedouble precision function atof(string)!DEC$ATTRIBUTES ALIAS : '_atof' :: atofcharacter*(*) stringend function atofend interface! Variablescharacter*128 stringdouble precision ff! Body of Console1string='123.e+23'
ff = atof(string//
char(0))print *,ffend program Console1
If I compile it for the WIN32 platform I have no problems, the EXE is generated.
If I compile it for the x64 platform I get the error LNK2019 for the _atof external reference.
Probably I have the MS Visual Studio (2005) badly configured.
Does anyone have a solution project that works correctly with WIN32 and X64 platform?
Thanks.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
On x64, the convention is no leading underscore. Try this instead:
!DEC$ATTRIBUTES DECORATE, ALIAS : 'atof' :: atof
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page