Menu

PB undifined reference

2002-08-07
2012-09-26
  • Nobody/Anonymous

    Hye ,
    I trye to use a librarie for displaying info on my chrystalfontz LCD. For that i copy the file lccdriver.h in the include directorie and  lcdriver.lib in the lib directorie and put this line in my code:
    #include <lcdriver.h>
    But when calling a fuction from this file i had an error: undifined reference to lcdRequest@0.. (lcdRequest is my function), it's like he couldn,'t find the lcdriver.h
    Could you give me some help with that
    Thanks

     
    • Nobody/Anonymous

      I don't think you can use .lib library files with Dev-C++.  You will need to convert it to a library file with a .a extension.  Search the forum for ".lib" for more information.

      Undefined references are always linker errors.  Your header file specified that the function lcdRequest() existed, but the linker could not find an implementation of that function.

      You will need to specify the library in the linker options for your project.  Display the project settings dialog box by choosing the "Project > Project Options" dialog box.  Linker options can be specified in the bottom part of the dialog box.  If your library is called liblcdriver.a, add "-llcdriver" to the linker options.

      Hope that helps,
      Don.

       
    • Nobody/Anonymous

      With newer versions you can use .lib as long as it is a C library and not a C++ one.

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.