View previous topic :: View next topic |
Author |
Message |
Anonymous Guest
|
Posted: Fri Feb 24, 2006 2:47 pm Post subject: Compile error in using a FORTRAN function in a VB.NET progra |
|
|
I have a FORTRAN solver that I am calling from within a VB.NET program. Periodically when I try to compile the VB code, I get the following compile error(s): "'NameOfAFunction' has a return type that is not supported or parameter types that are not supported." Where NameOfAFunction is the name of the FORTRAN subroutine that I am calling and I up to one of these for every one of the FOTRAN functions that I am calling from the VB code. I know that the subroutine calls are valid as the code has previously compiled and run without error and I have also verified the subroutine calls.
Sometimes this error is generated when I make a change to the FORTRAN call. I had tried to add a few additional subroutines to the FORTRAN code, but they kept resulting in the above error (with themselves as the listed problem function or the prexisting subroutine that I was already calling as the problem parameter). This error also can be generated in just changing between Debug .NET and Release .NET compilation.
The only way I have found to get rid of the error is to close down Visual Studio and then go around deleting every intermediate and final file that I can find for both my FORTRAN and VB projects and then restarting Visual Studio. Generally, I have to repeat this process a couple of times before the VB code will compile successfully.
I assume this error must be being caused by some outdated file from my solver dll still being referenced by Visual Studio; however, it seems to be a hit or miss proposition for me to find that file.
|
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7924 Location: Salford, UK
|
Posted: Fri Feb 24, 2006 3:45 pm Post subject: Compile error in using a FORTRAN function in a VB.NET progra |
|
|
Eric
Here are a couple of things you can try if you have not already done so.
1. Make sure the build order of your projects is correct.
2. Do a Rebuild of the whole solution.
3. Check that the executable is accessing the dll that is currently being built.
4. For good measure try removing and replacing the Refence to the dll. |
|
Back to top |
|
|
|