程序无法识别我已更改文件 [英] Program will not recognize that I have changed a file

查看:67
本文介绍了程序无法识别我已更改文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了一个问题,我正在更改特定的c源

文档,然后在控制台中运行相关的make命令。

如果我然后运行那个程序,好像更新已被忽略了。

实际上我正在做的这个改变是针对文件tcpdump.c的

program tcpdump。

我正在更改一个简单的打印声明,我肯定将会执行

执行:


Something喜欢

fprintf(stderr,%d包收到

filter\ n,stat.ps_recv);


**更改为**


fprintf(stderr,过滤器BLAH收到的%d包\ n,

stat.ps_recv) ;


我不觉得特定程序是我问题的根源。

我已经完成了基本命令设置(。 / configure,make,make

install)它运行正常。关于我的更新,我确信

tcpdump.c实际上正在被更改并且再次发出make命令

就好像它识别出文件的更改一样,并且再次运行

make会回复所有创建的.o文件最多为

日期。有没有人知道什么可以让我加入BLAH

被打印出来?我对c不是很有经验所以我认为我b $ b必须忽略一些涉及编译的东西。

..我正在使用SuSE linux而makefile调用gcc编译器。

解决方案

2004年7月2日14:18:28 -0700, hi ******** @ hotmail.com (Wes Johnson)

写道:

我''我遇到了一个问题,我正在更改特定的c源文件,然后在控制台中运行相关的make命令。




这是关于这里的主题,我们在哪里讨论C语言。你似乎

你的makefile有问题。在comp.unix.programmer或

中询问其中一个Linux组,也许是alt.linux.suse。


-

Al Balmer

Balmer Consulting
re ************************ @ att.net

嗨Wes


您的电脑是什么时间?


如果时间不对,makefile将无效。


我曾经遇到过这个问题。不能告诉你这是不是问题

在你的情况下但是值得检查......


检查你的文件名也可以保存。

也许你正在保存与makefile期望的

副本不同的副本,在另一个
目录中可能吗?


打开命令shell并输入make

a特殊选项以使make告诉你正在做什么。


在你的制造的文档中你会发现那种

的东西。


快乐的调试


Jacob

" jacob navia" < JA *** @ jacob.remcomp.fr>写道:

嗨Wes

您的电脑是什么时候?

如果时间不对,makefile将无效。


[...]


这并不是那么简单。当然正确地设置你的系统时钟

是一个好主意,但是单独的

系统上的时钟错误不会破坏Makefile。原因最好在一个更为相关的新闻组中讨论,可能是comp.unix.programmer,他们可以在这里告诉你有关NFS客户端之间时钟同步的问题。 >
和服务器,如果这恰好与你的问题有关。


-

Keith Thompson(The_Other_Keith) ks *** @ mib.org < http://www.ghoti.net/~kst>

圣地亚哥超级计算机中心< *> < http://users.sdsc.edu/~kst>

我们必须做点什么。这是事情。因此,我们必须这样做。


I''ve encountered a problem where I am changing a particular c source
document and then running the associated make command in the console.
If I then run that program, it is as though the update has been
ignored.
In actuality this change I am making is for the file tcpdump.c for the
program tcpdump.
I am changing a simple print statement that I am sure will be
executed:

Something like
fprintf(stderr, "%d packets received by
filter\n",stat.ps_recv);

** is changed to **

fprintf(stderr, "%d packets received by filter BLAH \n",
stat.ps_recv);

I don''t feel that the particular program is the source of my problem.
I have done the basic commands to set it up (./configure, make, make
install) and it is running fine. Concerning my update, I am sure that
tcpdump.c is actually being changed and the giving the make command
again acts as though it recognizes a change of a file, and running
make once again will reply that all the created .o files are up to
date. Does anybody know of what could be keeping my addition of "BLAH"
from being printed? I am not very experienced with c so I figure I
must be overlooking something involving compilation.
.. I am using SuSE linux and the makefile calls the gcc compiler.

解决方案

On 2 Jul 2004 14:18:28 -0700, hi********@hotmail.com (Wes Johnson)
wrote:

I''ve encountered a problem where I am changing a particular c source
document and then running the associated make command in the console.



This is off topic here, where we discuss the C language. You seem to
have a problem with your makefile. Ask in comp.unix.programmer or in
one of the Linux groups, maybe alt.linux.suse.

--
Al Balmer
Balmer Consulting
re************************@att.net


Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.

I had that problem once. Can''t tell you if it is the problem
in your case but it is worth checking...

Check the name of the file you are saving also.
Maybe you are saving a different copy than the
copy that the makefile is expecting, in another
directory maybe?

Open a command shell and type make with
a special option to make "make" tell you what is doing.

In the docs of your "make" you will find that kind of
stuff.

Happy debugging

Jacob


"jacob navia" <ja***@jacob.remcomp.fr> writes:

Hi Wes

What is the time of your computer?

If the time is wrong, makefiles will not work.


[...]

It''s not that simple. Certainly having your system clock set
correctly is a good idea, but an incorrect clock on a standalone
system won''t break Makefiles. The reasons are best discussed in a
more relevant newsgroup probably comp.unix.programmer, where they can
tell you about the issues of clock synchronization between NFS clients
and servers, if that happens to be relevant to your problem.

--
Keith Thompson (The_Other_Keith) ks***@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.


这篇关于程序无法识别我已更改文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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