- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There might be something simple I am over looking but I am having a hard time calling a subroutine from a Dll in an Intel Fortran console project. I have attached the console project and the dynamic library project (both in Intel Fortran). When I include the Dll file in the console project I get an error stating: LNK1107: invalid or corrupt file: cannot read 0x20. There is also a warning: file format not recognized [dll project debug forlder path]\SamsEngineDlliF.dll.
Link Copied
- « Previous
-
- 1
- 2
- Next »
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I note your mention of "C:/temp". what about this line of code in the example I downloaded:
setup.ApplicationBase = "c:\Sams2000\"
Should I set up such a directory and put the required DLLs there in order to run the version I downloaded and get it to work?
P.S. I would recommend running an all-debug version first to see what happens. At least that will stop when it meets a problem. A release version you cannot stop if it goes haywire.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That should do the trick. In the version I opened I have "c:\temp" but in the version uploaded I have "c:\Sams2000\" as the application base directory.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Just saw your P.S., unfortunately the debugger is only attached to the parent AppDomain process and I haven't figured out how to switch it to the child domain process when it is created (and switch it back when it is destroyed). Would you happen to know how to do that?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I believe you can debug a debug version of a dll by specifying a starting application while in Visual Studio with the DLL project open, although I am unable to give exact details at present as I am using my home laptop and not my workstation that has Visual Studio installed.
Perhaps Steve can come in here with advice?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes - with the DLL project open, select Project > Properties > Debugging. Enter the full path to the executable in Command. Set the Working Directory too if you need that.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Well, I created the folder c:/sams2000 and plonked the debug DLL's into it, along with their accompanying .PDB debug files. I also added the DLLLauncher.EXE and its .PDB file.
Then I opened the DLLLauncher project and ran it with the debugger first. No problems.
Then I ran it with 'Start without debugging' and got he following screen shots to show that the console appeared and disappeared as I assume is expected. It cycled through OK each time I pressed the button on the form with no apparent problems.
Oops, I embedded the screenshot instead of uploading the file - I know not how!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hmm, so the same projects worked on your system but not on mine? Maybe due to a difference in Intel Fortran version? I have version:
ntel(R) Visual Fortran Composer XE 2013 SP1 Update 3 Integration for Microsoft Visual Studio* 2012, 14.0.0092.11, Copyright (C) 2002-2014 Intel Corporation
I'm running on a windows 8.1 x64 machine. Any ideas on what I should try next? I could try these projects in a virtual machine and see if I can get them to work. It might be that this development environment has some sort of bad configuration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
My Platform is VS 2012 Pro 11.061030, Intel composer 2013 SP1 3.202 running on Windows 7 Pro, 64-bit.
I have not yet tried a Release version. Can you run a debug version OK? Is it just the Release configuration that behaves weirdly?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
yup, both versions give the same error on the second click. It also seems that our platforms are pretty similar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You should debug the code that creates the console by adding break points at important lines of code to try and isolate where the problem occurs. Steve has given you the necessary pointer as to how to do this.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- « Previous
-
- 1
- 2
- Next »