- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello, I have a large fortran project with 14 resource files, each with its own header file (all with different names). When I use the deftofd tool to convert the .h files to .fd files, the deftofd tool creates a $_win32 variable and sticks it in each .fd file, which causes a problem when I include more than one .fd file in a subroutine, is there any way to tell the tool not to create that variable? And what is it used for anyways?
Thanks
Link Copied
8 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's a very good question. I was not aware it was doing this, but I see that it is. No idea what it is used for - I will ask. For now, I suggest that you put each INCLUDE of the .fd files in a separate module and USE the module. This will avoid problems with the duplicate symbol, as long as you don't reference it. Issue ID is DPD200234030.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you. As a work around for now I have written my own translator for the h to fd files. Not pretty but works.
I am still interested in what that variable is?
I am still interested in what that variable is?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe this variable just specifies that the current operating system is WIN32. There should be a command line switch which can either enable or disable this behaviour. We are looking at this.
Best!
-Udit
Best!
-Udit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
More investigation reveals that using the /u switch disables the creation of $_WIN32 . Using a recent version of deftofd on a Win32 machine, I find the following:
[bash]x:/cq/testing$ cat whizzy.h
end
x:/cq/testing$ deftofd whizzy.h temp.fd
x:/cq/testing$ cat temp.fd
!
! temp.fd generated from whizzy.h
!
integer, parameter :: $_WIN32 = 1
x:/cq/testing$ deftofd whizzy.h temp.fd /u
x:/cq/testing$ cat temp.fd
!
! temp.fd generated from whizzy.h
![/bash]
I think all you need is /u upon invoking deftofd.
Best!
-Udit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note that in Visual Studio, deftofd is invoked as a custom build step for the .h file. You can edit the command used there to add the /u.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, is there any documentation showing what the command options are for deftofd?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There's no user documentation on options. We're going to change deftofd to not put out that symbol.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The definition will be removed in an update later this year (October would be my guess.)
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