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
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
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
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.
With newer versions you can use .lib as long as it is a C library and not a C++ one.