c - eclipse debug not work -


i use eclipse run c language program

after build project,it print

building target: testusb invoking: cross gcc linker gcc -l/opt/local/lib -lusb-1.0 -o "testusb" ./src/testusb.o finished building target: testusb

14:44:40 build finished (took 120ms)

14:44:49 **** incremental build of configuration debug project testusb **** make make: nothing done `all'.

14:44:49 build finished (took 68ms)

14:45:10 **** incremental build of configuration debug project testusb **** make make: nothing done `all'.

14:45:10 build finished (took 65ms)

in terminal when cd directory , type testusb,it print success.

enter image description here

but when debug use eclipse,it not print success , cannot step main breakpoint. enter image description here

the debug configure enter image description here enter image description here

the project structure enter image description here program

#include <stdio.h> #include <stdlib.h> #include <libusb-1.0/libusb.h> int main(void) {     libusb_context **libcontext;     libusb_device ***devicelist;     int status = libusb_init(libcontext);     if (status == 0) { //      libusb_get_device_list(*libcontext,devicelist);         printf("success");     } 

}

my question why debug cannot step breakpoint , cannot print success?

i found reason eclipse default support gdb,but mac ggdb.i try solution eclipse cdt cannot debug using gdb on mac apple-gcc42 not supported on os x versions newer el capitan,my mac macos sierra

i change xcode enter image description here

i add enter image description here enter image description here

it can debug! enter image description here

reference linking libraries in xcode

ld: library not found -lgoogleanalytics


Comments

Popular posts from this blog

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -