Skip to main content
Dominique Sacre
Rocketeer
Feb 15, 2013 10:29 PM UTC

Error LNK2001: unresolved external symbols: GetOpenFileName

Problem:

When trying the rebuild an EXE the following error message is displayed:

MyProg.obj: Error LNK2001: unresolved external symbols

   _GetSaveFileNameA@4

   _ CommDlgExtendedError@0

   _ GetOpenFileNameA@4

Resolution:

The library comdlg32.lib has to be added to the EXE.

When using the IDE, rightclick the EXE (or DLL) and select "Build Settings..."

On the tab "Link", change the category to "Advanced"

Enter comdlg32.lib into the entry field titled "Link with these LIBs"

And rebuild the project.

Old KB# 1433