从MS C版本6.0到MS VS 2008 [英] MS C Version 6.0 to MS VS 2008

查看:62
本文介绍了从MS C版本6.0到MS VS 2008的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个旧的开源程序,我们用它从我们的软件中打印PDF.我们发现使用新的PDF Reader 10.x时出现问题.我对程序源进行了更改,但无法编译,但出现以下错误.我不知道这些错误是从哪里来的.
我正在使用"cl pdfp.c"来编译程序.我需要使用一些选项吗?任何帮助将不胜感激,因为我对C的知识有限!谢谢!

I have an old open source program that we use to print PDFs from our software. We have found there is a problem when using the new PDF Reader 10.x. I have made a change to the program source but I am not able to compile it, I get the errors listed below. I do not know where these errors are coming from.
I am using "cl pdfp.c" to compile the program. Do I need to use some options? Any help will be appreciated because my knowledge of C is limited! Thanks!

pdfp.c
Microsoft (R) Incremental Linker Version 6.00.8447
Copyright (C) Microsoft Corp 1992-1998. All rights reserved.

/out:pdfp.exe
pdfp.obj
pdfp.obj : error LNK2001: unresolved external symbol __imp__MoveWindow@24
pdfp.obj : error LNK2001: unresolved external symbol __imp__ShowWindow@8
pdfp.obj : error LNK2001: unresolved external symbol __imp__FindWindowA@8
pdfp.obj : error LNK2001: unresolved external symbol _DdeUninitialize@4
pdfp.obj : error LNK2001: unresolved external symbol _DdeDisconnect@4
pdfp.obj : error LNK2001: unresolved external symbol _DdeClientTransaction@32
pdfp.obj : error LNK2001: unresolved external symbol _DdeCreateDataHandle@28
pdfp.obj : error LNK2001: unresolved external symbol _DdeFreeStringHandle@8
pdfp.obj : error LNK2001: unresolved external symbol _DdeConnect@16
pdfp.obj : error LNK2001: unresolved external symbol _DdeCreateStringHandleA@12
pdfp.obj : error LNK2001: unresolved external symbol _DdeInitializeA@16
pdfp.obj : error LNK2001: unresolved external symbol __imp__PostMessageA@16
pdfp.obj : error LNK2001: unresolved external symbol __imp__ShellExecuteA@24
pdfp.obj : error LNK2001: unresolved external symbol __imp__FindExecutableA@12
pdfp.obj : error LNK2001: unresolved external symbol _SetPrinterProperties
pdfp.obj : error LNK2001: unresolved external symbol _ClosePrinter@4
pdfp.obj : error LNK2001: unresolved external symbol _GetPrinterA@20
pdfp.obj : error LNK2001: unresolved external symbol _OpenPrinterA@12
pdfp.obj : error LNK2001: unresolved external symbol _GetPrinterDevMode
pdfp.obj : error LNK2001: unresolved external symbol _GetDefaultPrinterName
pdfp.exe : fatal error LNK1120: 20 unresolved externals

推荐答案

您需要将引用添加到链接程序要创建的可执行文件所要搜索的库中.如果您使用VS2008通过创建正确的项目设置来为您完成艰苦的工作,可能会更容易.
You need to add the references to the libraries to be searched by the Linker to create the executable file. It would probably be easier if you used VS2008 to do the hard work for you by creating a proper project setup.


Richard,再次感谢您的帮助!!!

我能够将此源添加到VS2008中,并使用一些更安全的命令将其编译干净,并带有一些警告.我将对此进行测试,以确保它解决了我的问题,然后我将返回并用适当的命令替换一些已贬值的命令.

再次感谢您的帮助!
Richard, Thanks again for your help!!!!

I was able to get this source into VS2008 and it compiled clean with some warnings to use a safer command. I am going to test this to make sure this resolved my issue and then I will go back and replace some of the depreciated commands with proper commands.

Thanks again for your help!!


这篇关于从MS C版本6.0到MS VS 2008的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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