- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Any suggestions?
Thanks
コピーされたリンク
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
Here is the general way to debug an "external" app that calls your DLL. In the DLL project, go to the Debugging property page and for the Command property, give the full path to the executable that is to run. You also need to ensure that the DLL that is loaded is exactly the same one that the project builds, not a copy. So if you need to, change the Output File property in the Linker > General page to be the path the VB app is going to load.
Then set your breakpoint and start under the debugger. The executable will run and your breakpoint should hit.
I will note for others reading this that this advice doesn't apply if you are building the VB (or other) application in the same VS solution, and that for managed code applications you need to set the "Enable unmanaged code debugging" property in the other language (VB, etc.).
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
yes the project is in native VB6, there is a project pending to upgrade it to .net but no funding at the moment.
I changed the DLL call to point to the output(debug) directory from the compile. I am also debugging the VB app so I wasn't sure what the command line would be. I compiled the app and enteredthe exe as the command line and ran, the breakpoint still wasn't hit. I verified it was the right DLL by deleting it first and then doing the recompile.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
1. in the VS 2010 fortran I had to set the debug command line to C:\Program Files (x86)\Microsoft Visual Studio\VB98\VB6.EXE
2. open the VB Project and start the run
3. start the fortran application
4. trace through the VB app until getting to the fortran where control was tranfered to VS 2010.
On the orignial project I have the same setup now but when I try to set the breakpoints in the fortran code its telling me the breakpoint won't be hit because no symbols have been loaded for this document.
The original developer of the Fortran had used includes but moving the code out of the includes into the main program didn't help.
any suggestions there?
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
It's all in Fortran, so the debugging trace part is easy.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
(VB)
Private Declare Sub testlite Lib "c:\msdev\projects\test\test\debug\testlite.DLL" Alias "_routine@44" _
(ByVal iCall As Integer, sPath As mySpath,iVar1 As Integer, _
cVar1 As cVar1ByteArr, dVar1 As Double, dVar2 As Double, _
dVar3 As Double, ByVal iErrorReturn As Integer)
I will have to do some work to post a fortran example.
I did add the intent statment for the string array in Fortran
CHARACTER*612,INTENT(INOUT)::cVar1(MAXSER * 15)
I do remember seeing something a while back where you had to add a variable to pass the size of the array as well as the array itself i will look at adding that in.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
!DEC$ ATTRIBUTES REFERENCE :: cVar
to the Fortran code.
I assume you have a:
!DEC$ ATTRIBUTES STDCALL, REFERENCE :: routine
in there somewhere.
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
!DEC$ ATTRIBUTES REFERENCE :: cVar
references were missing from the code which has resolved the crashing issue.
One additional item when the application closes I receive this message
"R6031 - Attempt to initialize the CRT more than once. This indicates a bug in your application."
I'm not sure how to turn off managed code in this compiler.
Thanks
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
runtime library = Multithread DLL (/libs:dll /threads)
use common windows libraries = no
use Port library = no
use Intel Math Kernel Library = no
Disable Default Library Search Rules = no
Disable OBJCOMMENT Library Names in Object = No
I made this change and it seems to have resolved the issue, let me know if there are any adverse effects to using the setting below, Thanks.
runtime library = Multithread
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
- 新着としてマーク
- ブックマーク
- 購読
- ミュート
- RSS フィードを購読する
- ハイライト
- 印刷
- 不適切なコンテンツを報告
I have a similar situation, just upgraded my Fortran DLL projects from Compaq Visual Fortran to Intel Parallel Studio XE 2013 with Visual Studio 2010, but the calling program is VB6. It calls a Fortran DLL, which subsequently calls two other Fortran DLL's.
With some effort, I was able to get everything to work together as an installed application. It also works fine when I run the main program in the VB6 debug environment, calling all the Fortran dll's. However, when I try to run from the debug environment in the Fortran project, the main program launches, but then gives an error that it can't find the dll. (I have the .exe in the same "solution", and defined as the startup project.)
I know from experience that VB issues the same "file not found" error whether it is missing the actual dll that it is trying to call, or something that the dll is dependant upon, so I don't really know what it is not finding. The Fortran project is for the main dll, and includes the .lib files for the dll's which it calls. The .exe and all the dll files are in the same directory, which is set as the working directory for the project.
The program starts fine, but as soon as it tries to call the dll, it issues error #53, file not found. Any ideas?
------------------------------------------------------------------------------------------------------------------------------------------------------------
Update: I found the problem. In my main Fortran DLL I pointed to the "Release" version .LIB for one of the other DLL's, but the DLL in the working folder was from the "Debug" version.