VS2012中调用类似fabs()和sqrt()函数,参数为double类型数函数有效,参数为变量或者复杂的数学表达式无效
VS2012中调用类似fabs()和sqrt()函数,参数为double类型数函数有效,参数为变量或者复杂的数学表达式无效
调试的时候一遇到这类数学函数都会有如下提示:(以sqrt函数为例)
You need to find sqrt.asm to view the source for the current call stack frame
Try one of the following options:
-Browse and find sqrt.am...
You can view disassembly in the Disassembly window. To always view disassembly for missing source files,change the setting in the Option dialog.
Source search information
Locating source for 'f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\tran\i386\sqrt.asm'. Checksum: MD5 {dd e7 2b 95 3a 36 c9 63 55 5e 42 7 b1 83 9a 8d}
The file 'f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\tran\i386\sqrt.asm' does not exist.
Looking in script documents for 'f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\tran\i386\sqrt.asm'...
Looking in the projects for 'f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\tran\i386\sqrt.asm'.
The file was not found in a project.
Looking in directory 'D:\Visual Studio 2012\VC\crt\src\'...
Looking in directory 'D:\Visual Studio 2012\VC\crt\src\vccorlib\'...
Looking in directory 'D:\Visual Studio 2012\VC\atlmfc\src\mfc\'...
Looking in directory 'D:\Visual Studio 2012\VC\atlmfc\src\atl\'...
Looking in directory 'D:\Visual Studio 2012\VC\atlmfc\include'...
Looking in directory 'D:\XX\XXX\Visual Studio 2012\VC\atlmfc\src\mfc'...
Looking in directory 'D:\XX\XXXX\Visual Studio 2012\VC\atlmfc\src\mfcm'...
Looking in directory 'D:\XX\XXXX\Visual Studio 2012\VC\atlmfc\src\atl'...
Looking in directory 'D:\XX\XXXX\Visual Studio 2012\VC\crt\src'...
Looking in directory ''...
Looking in directory 'D:\XX\XXXX\Visual Studio 2012\VC\include'...
Looking in directory 'D:\XX\XX\Visual Studio 2012\VC\atlmfc\include'...
Looking in directory 'C:\Program Files (x86)\Windows Kits\8.0\Include\um'...
Looking in directory 'C:\Program Files (x86)\Windows Kits\8.0\Include\shared'...
Looking in directory 'C:\Program Files (x86)\Windows Kits\8.0\Include\winrt'...
The debug source files settings for the active solution indicate that the debugger will not ask the user to find the file: f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\tran\i386\sqrt.asm.
The debugger could not locate the source file 'f:\dd\vctools\crt_bld\SELF_X86\crt\prebuild\tran\i386\sqrt.asm'.
没有人回答吗?只有小白我在做数值计算时碰到这种问题吗?求大神解救.
你把你的整型变量或者表达式乘以1.0,然后作为sqrt的参数,这样就可以了.
你没有sqrt的源程序,是无法对sqrt进行调试的.谢谢您的回答,代码的所有变量都是double类型的;如果我不能调试sqrt 那么我就不能逐语句调试了吗?那我就无法监视相关变量的数值了,该怎么办呢,请指教,谢谢!你到了调用sqrt的那个语句的时候,按F10单步调试,不要按F11单步调试。