c程序中的链接器错误 [英] Linker error in c program

查看:103
本文介绍了c程序中的链接器错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是c程序的初学者...



是什么意思

链接器错误:模块中未定义的符号打印



任何人解释

I am the beginner for c program...

what is mean by
Linker Error: undefined symbol print in module

anyone explain

推荐答案

你拼写错误 printf


有问题的链接器错误意味着您使用了函数 print 但链接器无法在任何函数中找到该函数您添加到链接器的库。



请在使用C之前阅读更多书籍,因为如果您不能使用它,这是非常无情的语言更简单,如c#,vb.net或java。
The linker error in question means that you have used a function print but the linker cannot find that function in any of the libraries that you have added to the linker.

Please read some more books before working with C as it is very unforgiving, if you are not up to it switch languages to something easier like c#,vb.net or java.


这里的朋友是C中链接器错误的解决方案,



链接器错误是运行时出现的错误。在我运行程序时,程序直接链接硬件,如I / O或图形设备等。

但是在编译期间Ť他只使用包含的头文件的直接交互来检查指令集的语法。生成目标代码(.obj)文件,实际上用户无法运行。这是由汇编程序完成的。

但是文件的链接是指生成可由用户运行的可执行(.exe)文件。在C程序的运行时,编译器也希望获得相应硬件的访问权限。它试图链接通过使用编译器提供的硬件驱动程序相关的硬件。

如果编译器无法访问硬件,则无法创建可执行文件。然后生成链接器错误。 />
以下是此问题的解决方案。

对于Turbo c3编译器,

转到选项 - >链接器 - >图书馆 - >检查必要的库(例如,在图形编程中检查图形库是否存在链接器错误,或者检查由于使用的汇编程序类而出现链接器错误的C程序的Container类,或者检查通用或标准输入输出C程序的标准运行时间)。

谢谢各位朋友,

试试我的解决方案.... :)
Hey friends here is a solution for linker errors in C,

Linker error are the errors which are arised during runtime.In C while we run a program the program directly links with the hardware such as I/O or Graphics devices etc.
But during the compilation time the code only checks the syntax of the instruction sets by using direct interaction of the included header files.An object code(.obj) file is generated which can't be run by user actually.This is done by assembler.
But linking of files refers to generation of an executable(.exe) file which can be run by user.During runtime of a C program the compiler wants to get the access of the corresponding hardware also.It tries to link with the related hardware by using the hardware drivers provided by the compiler.
If the compiler doesn't get the access to the hardware it fails to create the executable file.Then a linker error is generated.
Here is the solution for this problem.
For Turbo c3 compilers,
Goto Options -> Linker -> Libraries -> check the necessary Libraries (e.g. check Graphics Library for linker error in graphics programming or check Container class for the C programs where a linker error is arised due to the continer classes used or check Standard run time for the general or standard input-output C programs).
Thank you friends,
Make a try of my solution.... :)


这篇关于c程序中的链接器错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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