简体   繁体   中英

Why eclipse is not debugging when using external library in C?

First of all, I'm a begginer in C programming. I have been looking for a solution for a long time but I don't know what's going on with mi code or with Eclipse configuration. Basically, the problem occurs when I insert in the code a function from a external library. For some reason, eclipse is not able to debugg the code.

Let me explain that with a simple example:

Works incorrectly:

int main(void) {

    char        version[32];

    puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */

    En2version(version);

    printf("Version %s \n", version);

    return 0;

}

Works correctly:

int main(void) {

    char        version[32];

    puts("!!!Hello World!!!"); /* prints !!!Hello World!!! */

    printf("Version %s \n", version);

    return 0;

}

En2version() is the function took from the external library, and just eliminating it from the code it makes it work correctly.

I think the library is correctly linked to the project (there is no error when .lib is linked). Could you help me with some insight about what is happening?

Thank you all.

I don't see your #include

Whatever your are using, you need debugging symbols

  • either using the Program Database way if you have a .pdb
  • either using the Embedded Symbols way if you have a no .pdb

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM