- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I just tried to build the simplest dialog box following the example from users' guide. But I got an error message:
Compiling resources...
C:FORTRANFILEDLGBOXDIALGBOX.RC(10) : fatal error RC1015: cannot open include file 'afxres.h'.
Error executing rc.exe.
Can anyone tell me what was wrong? My code are
program dgbox
use dfwin
!dec$objcomment lib:"user32.lib"
use dflogm
implicit none
include 'resource.fd'
type (dialog) dlg
integer retint
logical retlog
character*80 text
retlog = DlgInit( idd_dgbox, dlg )
if ( .not. retlog) then
write (*,*) "error: resource not found"
else
retint = DlgModal( dlg )
endif
end program
Compiling resources...
C:FORTRANFILEDLGBOXDIALGBOX.RC(10) : fatal error RC1015: cannot open include file 'afxres.h'.
Error executing rc.exe.
Can anyone tell me what was wrong? My code are
program dgbox
use dfwin
!dec$objcomment lib:"user32.lib"
use dflogm
implicit none
include 'resource.fd'
type (dialog) dlg
integer retint
logical retlog
character*80 text
retlog = DlgInit( idd_dgbox, dlg )
if ( .not. retlog) then
write (*,*) "error: resource not found"
else
retint = DlgModal( dlg )
endif
end program
Link Copied
3 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
What version of Visual Fortran are you using? You entered "5.2" (only moderators can see that), but there is no such version.
afxres.h should be in Microsoft Visual StudioVC98Include and that path should be listed under Tools..Options..Directories..Include files. Try doing a Per-User Setup (from Visual Fortran program group) and see if that helps - if not, manually add the above path (including appropriate device) to the list of include directories.
Steve
afxres.h should be in Microsoft Visual StudioVC98Include and that path should be listed under Tools..Options..Directories..Include files. Try doing a Per-User Setup (from Visual Fortran program group) and see if that helps - if not, manually add the above path (including appropriate device) to the list of include directories.
Steve
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks, Steve. I fixed it.
BTW, do you know how to pass a string (file name with path) from VB to a fortran executalbe file? I know it can be done by DLL, but can it also be done through an exe file ?
BTW, do you know how to pass a string (file name with path) from VB to a fortran executalbe file? I know it can be done by DLL, but can it also be done through an exe file ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'll answer in your other topic.
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