c++ - Stack overflow before debugging main function in amd64 -
i have working 32 bit application several dependency. rough estimation of dependency below -
[handshake_win32.exe] ----> [libhandshake32.dll] ----> [libeay32, ssleay32.dll] ----> [zlib1.dll]
now use libhandshake32.dll through jni code reuse. jvm 64-bit guess library needed recompiled x64 arch.
my first target running current baseline handshake_win32.exe in x64. have recompiled dll x64. after successful recompilation when start debug mode getting immediate stack overflow @ main function.
unhandled exception @ 0x000007f602f79567 in handshake_win32.exe: 0xc00000fd: stack overflow.
i have tried check dll signature dumpbin , seems have machine type x64. dependency walker gives following error message of x64 modules -
error: @ least 1 module has unresolved import due missing export function in implicitly dependent module. error: modules different cpu types found.
it shows x86 version of msvcr100.dll loaded actual dll's arch x64.
can suggest possible causes of problem?
thanks in advance.
1、if use cmd/bat compile dlls, start cmd/bat way:
%comspec% /k ""path_to_vs\vc\vcvarsall.bat"" amd64
or
%comspec% /k ""path_to_vs\vc\vcvarsall.bat"" x86_amd64
instead of:
%comspec% /k ""path_to_vs\vc\vcvarsall.bat"" x86
2、if use gui, you'd better check command line:
c/c++->command line linker->command line
sometimes, when change configeration in vs gui, command lines not change, you'd better start new project , copy soure files there.
Comments
Post a Comment