Microsoft KB Archive/135709

= PRB: Visual C++ Link Error LNK2001: unresolved external symbol =

Article ID: 135709

Article Last Modified on 8/13/1999

-

APPLIES TO


 * Microsoft Visual FoxPro 3.0 Standard Edition

-



This article was previously published under Q135709



SYMPTOMS
When trying to build a dynamic link library (DLL) (Hello.dll or another .dll file) using Visual C++, 32-bit Edition, and following the instructions in the Professional Features Guide on page 188. You could receive the following errors:

Linking ..

Linking error LNK2001: unresolved external symbol "__PutStr"

WinRel/YourDll.dll ; error LNK1120: 1 unresolved externals Error executing link.exe



CAUSE
The problem is that you have not set the Calling Convention to _fastcall. It may still be set to __cdedl*.

In the Project Settings of Visual C++, 32-bit Edition, if you do not set the C/C++ Tabs Category "Code Generation" Calling Convention: to _fastcall You will receive these errors. This is covered on page 188 in the "To establish project settings" section.

NOTE: In the Project Settings Dialog Box, you can give the setting for either or both projects (Win32 Debug or the Win32 Release). To set the settings for both, select one and drag to highlight all others under the Settings For: area of the Project Settings.

Additional query words: VFoxWin

Keywords: KB135709

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.