error LNK2001: unresolved external symbol
We all know this error and we know we need to add the library. Easy (if you use VC6), go to Project, Settings (Alt+F7) and add the library on the Link page. F7 to recompile. Same error. Check the library, spelling is correct? Yes, why do I get these errors. Check the help files. Stop, you will not find it that easy. I stumbled acros it a year ago and today when I started searching for the answer I decided to write this article to make it easy for you.
When we use MEAD (Minimal Eikon Application Developer) to create a start off project and the use ABLD MAKEFILE VC6 to use VC6 as our editor. We will have this linking problem when we add additional libraries.
When using VC6, the NMAKE doesn’t make use of the settings you made in VC6. You need to make these changes directly in the .SUP.MAKE file. Now for me and you to go fiddle in that file can cause extra problems. Thus what we need to do is go back do step 1 of creating a VC6 workspace.
Edit the .MMP file created by MEAD.
Add a line LIBRARY filename.lib
Recreate VC6 workspace by running ABLD MAKEFILE VC6
Open your project again in VC6, add the Engine or Gui workspace and recompile. Your link error should be gone.
|