c++ - Eclipse/CDT cannot debug application with linked dependencies - program exits with code 0xc0000135 -
i have 2 c++ projects in eclipse, "amp" , "amp_auditions"
the first creates library, c:\users\jared\eclipseworkspace\amp\debug\libamp.dll
the second, test program ('c:\users\jared\eclipseworkspace\amp_auditions'
), depends on first, , has directory c:\users\jared\eclipseworkspace\amp\debug
listed under project properties > library dependencies
to use amp library created, thought needed link library file , include headers, apparently isn't simple.
everything compiles, when go debug, application terminates. gdb trace tells me:
488,262 19^error,msg="during startup program exited code 0xc0000135."
if run test program directly in terminal, complains missing dependencies. if place libamp.dll
file in c:\users\jared\eclipseworkspace\amp_auditions
directory, works fine. tells me issue debugger can't find libamp.dll
what did miss? why won't test program run within eclipse debug perspective?
gcc -v
collect_gcc=gcc collect_lto_wrapper=c:/mingw/bin/../libexec/gcc/mingw32/4.6.2/lto-wrapper.exe target: mingw32 configured with: ../gcc-4.6.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --build=mingw32 --prefix=/mingw thread model: win32 gcc version 4.6.2 (gcc)
gdb trace:
487,988 2-environment-cd c:/users/jared/eclipseworkspace/amp_auditions 487,991 2^done 487,991 (gdb) 487,991 3-gdb-set breakpoint pending on 487,991 3^done 487,991 (gdb) 487,992 4-gdb-set detach-on-fork on 487,992 4^done 487,992 (gdb) 487,992 5-enable-pretty-printing 487,992 5^done 487,992 (gdb) 487,992 6-gdb-set python print-stack none 487,993 6^done 487,993 (gdb) 487,993 7-gdb-set print object on 488,003 7^done 488,003 (gdb) 488,004 8-gdb-set print sevenbit-strings on 488,005 8^done 488,005 (gdb) 488,005 9-gdb-set host-charset utf-8 488,005 9^done 488,006 (gdb) 488,006 10-gdb-set target-charset windows-1252 488,016 10^done 488,016 (gdb) 488,017 11-gdb-set target-wide-charset utf-16 488,017 11^done 488,017 (gdb) 488,017 12source .gdbinit 488,027 &"source .gdbinit\n" 488,027 &".gdbinit: no such file or directory.\n" 488,027 12^error,msg=".gdbinit: no such file or directory." 488,027 (gdb) 488,028 13-gdb-set target-async off 488,028 13^done 488,028 (gdb) 488,029 14-gdb-set auto-solib-add on 488,029 14^done 488,029 (gdb) 488,029 15-gdb-set solib-search-path c:\\users\\jared\\eclipseworkspace\\amp\\debug 488,029 15^done 488,029 (gdb) 488,031 16-file-exec-and-symbols --thread-group i1 c:/users/jared/eclipseworkspace/amp_auditions/deb\ ug/amp_auditions.exe 488,065 16^done 488,065 (gdb) 488,067 17-break-insert --thread-group i1 -t -f main 488,134 18-list-thread-groups 488,167 17^done,bkpt={number="1",type="breakpoint",disp="del",enabled="y",addr="0x004013ad",func="ma\ in()",file="..\\src\\amp_auditions.cpp",fullname="c:\\users\\jared\\eclipseworkspace\\amp_auditions\\ \src\\amp_auditions.cpp",line="14",times="0",original-location="main"} 488,167 (gdb) 488,167 18^done,groups=[{id="i1",type="process",executable="c:\\users\\jared\\eclipseworkspace\\amp_\ auditions\\debug\\amp_auditions.exe"}] 488,168 (gdb) 488,172 19-exec-run --thread-group i1 488,205 =thread-group-started,id="i1",pid="3220" 488,205 =thread-created,id="1",group-id="i1" 488,205 ~"[new thread 3220.0xa8c]\n" 488,205 19^running 488,205 *running,thread-id="all" 488,205 (gdb) 488,206 20-list-thread-groups --available 488,260 =thread-exited,id="1",group-id="i1" 488,261 =thread-group-exited,id="i1" 488,262 19^error,msg="during startup program exited code 0xc0000135." 488,262 (gdb) 488,262 20^error,msg="can not fetch data now." 488,263 (gdb) 488,270 21-gdb-exit 488,293 21^exit
my understanding of problem has nothing eclipse. .dll linked dynamically, @ runtime. means running application must find library (.dll) in system path or in running executable folder.
a solution immediate problem add directory .dll compiled windows path variable.
Comments
Post a Comment