首 页 | 新 闻 | Symbian | Windows Mobile| J2ME | 下载中心 | 游戏策划 | 购书指南 | 移动开发视频教程
您现在的位置: 开发视界 >> Symbian英文资料 >> Tools SDK >> 文章正文
Linking Libraries 9210
作者:佚名    文章来源:不详    更新时间:2006-5-7 11:24:09

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.

相关文章:
Codewarrior: how to avoid the "Too Many Include Paths" error when using the UIQ 2.1 SDK
Using Extended Notifiers
Compress Your Symbian C++ Executables
Finding Initialized or Uninitialised static data in a DLL
Image loading and color reduction
Symbian  OS Error Codes
LEAVE and TRAP
Using C code in symbian