---
title: "今天碰到VC的链接问题"
author: "hellhell"
date: "2009-10-15T22:29:47Z"
tags: []
slug: "vc"
draft: false
lastmod: "2009-10-15T22:29:47Z"
id: 491830
url: "https://silconfuse.iteye.com/blog/491830"
---

在MSVC中,如果用dllimport修饰的函数还在def文件中声明，那么它导出时函数名会被修改成_imp_funcname状.今天，client代码的写法是准备从dll在import函数，不想那个dll已经变成lib了，导致link错误，当时看到一堆找不到_imp_xxxx函数的错误，相当迷茫。
下面两个链接仔细说明这个问题：
http://msdn.microsoft.com/en-us/library/54xsd65y.aspx
http://stackoverflow.com/questions/334896/clrdump-c-error-lnk2019-unresolved-external-symbol-impregisterfilter8-r