- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A strange little bug with v6.6: when using loc(..) to get an integer pointer to a Windows function (e.g. DefWindowProc), then a link error message is generated unless the function is also referred to directly in that module.
For example, the code
program Bug
use DFWin
integer (4) ret
! ret = DefWindowProc(0,0,0,0)
ret = loc(DefWindowProc)
end
generates the messages
Compiling Fortran...
S:UsersStuartTESTBugug.for
Linking...
bug.obj : error LNK2001: unresolved external symbol _DefWindowProcA
Debug/Bug.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Bug.exe - 2 error(s), 0 warning(s)
By simply uncommenting the line "ret = DefWindowProc(...)", things work fine!
Stuart.
For example, the code
program Bug
use DFWin
integer (4) ret
! ret = DefWindowProc(0,0,0,0)
ret = loc(DefWindowProc)
end
generates the messages
Compiling Fortran...
S:UsersStuartTESTBugug.for
Linking...
bug.obj : error LNK2001: unresolved external symbol _DefWindowProcA
Debug/Bug.exe : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
Bug.exe - 2 error(s), 0 warning(s)
By simply uncommenting the line "ret = DefWindowProc(...)", things work fine!
Stuart.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please send this to vf-support@compaq.com so that it gets tracked and fixed.
Steve
Steve

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