您的位置:首页 > 其它

New files creation and Makefile

2015-04-21 09:05 495 查看
These days while coding on Gnome-Logs, I gotta create two new files that are gl-misc.c and gl-misc.h. And then I met some error related to this. Here's how it happens.

I created two new files in the project and wrote relative codes in these two files. Then I compiled the program, but I got a error saying that the function in gl-misc.c is not defined. I'm pretty confused about this. I did include the header file. Right
now something came into my mind. I ever did things like this. In the second patch I contributed to Gnome-Logs, I created two new files too to get the job done. Then I realized I need to add something in the Makefile.

So here is the solution. When you are adding new files to a gnome project. you need add the two files in the Makefile.am file. The screenshot down below shows how it should be done. (L37 and L66)

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息