Click to See Complete Forum and Search --> : How to use a custom library


G`HOST
April 6th, 2009, 06:28 AM
Hi I am trying to use a custom DLL with Dev c++,
I have the Dll , the .h file and the .lib file
This is what I am doing

#include <windows.h>
#include "XXControls.h"

........

RedrawButton(.. , ..) ;

And am getting this linker error

[Linker error] undefined reference to `RedrawButton@8'

How can I use a custom dll like this ?

Marc G
April 6th, 2009, 08:05 AM
You need to link to the library. So add <customlibrary>.lib to your linker settings.

G`HOST
April 7th, 2009, 01:28 AM
How can I do that ?

Marc G
April 7th, 2009, 08:35 AM
Sorry, I never used Dev C++, so I don't know the exact steps to do this. Try to find the linker settings and then find where you could add additional libraries like <customlibrary>.lib.