- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I am trying to create a dll file for my library in TRNSYS with the intel visual compiler and microsoft visual studio. When compiling I receive two errors "Compilation Aborted (code1)" and "error #6580: Name in only-list does not exist.", which can be see from the build log.
TRNSYS Version 17.01.0028 and Microsoft Visual Studio Community 2015 Version 14.0.25431.01 update 3.
Any help with this issue would be highly appreciated. The source file is also included.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The source you attached isn't the one that got the error.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
Thank you for the response.Yes, you are correct. The source code "Type250.f90" calls "callprogram.f90", where it gets an error, I attached it to this message now. I found another thread regarding this issue "http://energy-models.com/forum/trnsys-users-type-15" where they say to comment out "!Use ifport , only:createProcess" , which i assume is line 50 in the source where the error occurs? Will there be any problems doing this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You were given incorrect information. This code is trying to use the Windows API CreateProcess routine. If you replace IFPORT with KERNEL32 it may work.
For more information on calling CreateProcess see http://software.intel.com/en-us/forums/topic/275071#comment-1548443
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi again,
I replaced ifport with KERNEL32 in the line " Use ifport , only:createProcess", then I got one fatal error " in Callprogram.f90.
LINK : fatal error LNK1207: incompatible PDB format in 'C:\Trnsys17\Compilers\Ivf11x\TRNDll\Debug\TRNDll.pdb'; delete and rebuild"
which can be seen from the added build log at the bottom of the text file.
I am new to this so i apologize for any frustrating questions,
best regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That's a very different error. You should be able to get through that by deleting any files with .pdb as a file type in the project and then rebuilding the project.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you did get a DLL. It was copied to your EXE folder. The build succeeded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, right click and select Compile just compiles one source, and it looks as if now you have a syntax error in that file. But maybe TYPE_250 isn't in your project. Please attach the .vfproj file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The first line in Type250.f90 was probably meant to be a comment: "Object: Type250" is not a valid Fortran statement.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, I attached the .vfproj file from where Type250.f90 is placed. Also i attached a printscreen of the interface. From the output window It seems like it skips the project "MyType" where Type250.f90 is located. It is this source i want to create a dll file from.
Mecej4, commenting out this line only caused 5 more errors so i just left it as it is.
Thanks for the feedback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the messages I get the impression that the projects were excluded from the build. Try and open the configuration manager - there you can indicate per project whether they are to be built or not. It may be that somehow these projects have been excluded.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hm, I can only judge this from the screenshot. The first line is incorrect as a Fortran statement. It starts with a label and then there should a keyword like DO or IF or another construct to associate the label with - that is the meaning of the error message. Why the compiler still does not accept it, is not something I can work out from the screenshot.
Can you post the screenshot for the error you get when the first line is properly commented out as well?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The reason for the error messages is that your source code does not contain a SUBROUTINE or FUNCTION statement before the declarations and executable statements. Not having seen either, the compiler assumes that the source code is a main program without a PROGRAM statement (which is allowed, but not recommended). Afterwards, it sees a RETURN statement, which is invalid in a main program.
Please consult the TRNSYS documentation and example source files to see the proper SUBROUTINE statement to use.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Okay, that makes alot of sense. Thank you all for the help. I will look into the documentation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am not a TRNSYS user, but there are indications in the source files that you posted that they were machine-generated, at least partly. If so, the problem with no SUBROUTINE statement being generated is a problem attributable to the TRNSYS file generation process/program. In such situations, fixing just the generated faulty code is not a viable solution.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page