错误LNK2019:函数WinMain中引用了未解析的外部符号__imp_MessageBoxA [英] error LNK2019: unresolved external symbol __imp_MessageBoxA referenced in function WinMain

查看:164
本文介绍了错误LNK2019:函数WinMain中引用了未解析的外部符号__imp_MessageBoxA的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

#include< stdio.h>

#include< windows.h>
#include <stdio.h>
#include <windows.h>

推荐答案

你使用的是哪个编译器?哪个版本? 



你是如何构建的?在IDE中?从命令行? 
$


您是否使用Visual Studio中的某个项目模板创建项目?

如果是这样,哪个一个?
$


由于您显示的消息是指MessageBoxA,因此它表明Unicode未被启用为
,这进一步表明您没有在最新版本的Visual Studio中使用一个
项目模板,因为它们是b $ b默认启用Unicode。



在IDE中使用适当的模板时,正确的设置是在构建中使用的
来指定要使用哪些* .lib文件以及在哪里使用
找到他们。



给我们上述问题的答案,我们可能会就如何以最佳方式向您发出指示。$


- Wayne

Which compiler are you using? Which version? 

How are you building this? In an IDE? From the command line? 

Did you create a project using one of the project templates in Visual Studio?
If so, which one?

Since the message you show refers to MessageBoxA it suggests that Unicode is
not enabled for the build, which further suggests that you did not use a
project template in one of the recent versions of Visual Studio as they
default to Unicode enabled.

When you use an appropriate template in the IDE then the proper settings are
used in the build to specify which *.lib files to use as well as where to
find them.

Give us answers to the above questions and we may be able to give you directions
on how best to proceed.

- Wayne


这篇关于错误LNK2019:函数WinMain中引用了未解析的外部符号__imp_MessageBoxA的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆