[Linker Error] Unresolved external

Hi,

I've banged my head against the wall a couple of times today, because I can't seem to figure out how to fix the following compile error:

[Linker Error] Unresolved external 'Malpha::Malpha()' referenced from D:\<PATH>\MAIN.OBJ

My understanding is that this means that the compiler can find the function implementations.

I use borland c++builder6. I created some dll's which are needed for the .exe to run. Here is a screenshot (don't know if it would help or not):
http://img593.imageshack.us/f/3282011113747pm.png/

All the functions are implemented and tested before I created separate dll's. Please help me because I'm so close! (I hope...)



Last edited on
Are you linking those libraries?
Well.. the function Malpha is included in the machines.dll. I added the .lib file from machines to app.exe. All the dll's had no problem building, just the app.exe.

Not sure if I answered your question though..
Will you please check library path and confirm library (machines.dll as you said) is present at that location.
I seem to have figured out what the problem was. When I was creating the dll's I knew you had to put the following lines at the top of the header files:
1
2
3
4
5
#ifdef __DLL__
 #define impexp __declspec(dllexport)
#else
 #define impexp __declspec(dllimport)
#endif 


What I didn't know was you had to put "impex" before the class definition. Well, I Guess thats that. Thanks anyway for taking the time to reply.

Cheers!


Topic archived. No new replies allowed.