English 中文(简体)
将校准与在编造档案中指明道路联系起来[复制]
原标题:linking libaries and specifying path in makefile [duplicate]
  • 时间:2010-01-20 10:12:50
  •  标签:
  • c

This question already has answers here:

Closed 10 years ago.

Possible Duplicate:
Linking apache libraries

g 履历4.4.2c

我试图把一些头盔和图书馆连接到我的档案中。 但出于某种原因,我的方案似乎没有联系。

我在我的目录中,有rc/in/rc。

我汇编了这些图书馆,并将其置于我的校准中,我把负责人放在名录中。

我的迫害是rc。

在我的发言中,我明确指出:

LIBS_PATH -L./lib
INC_PATH -I./include

LIBS = -libapr-1

因此,从现在起,执行者从何处执行。

在我的校正中,我有以下图书馆:

libapr-1.so

我在文件夹中载有以下标题:

apr.h

该方案正在查找主人档案。 但是,我认为,这并不是把图书馆连接起来,因为我没有发现任何错误,说它能够找到头盔。

在我包括负责人的档案中,我已经这样做。

#include <apr/apr.h>

我确实收到以下错误信息:

In file included from include/apr.h:17,                
./include/apr/apr.h:285: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘apr_int32_t’

许多人感谢任何建议和建议,

EDIT:

LIBS_PATH -L./lib
INC_PATH -I./include

LIBS = -lapr

Error: /usr/bin/ld: cannot find -lapr

文件:

OBJECT_FILES = dlg_fsm.o 

CFLAGS = -ggdb -Wall 

FLATFORM = -DLINUX

CC = gcc

LIBS_PATH = -L./lib
INC_PATH = -I./include

LIBS = -lapr

dlg: $(OBJECT_FILES)
    $(CC) $(CFLAGS) $(LDFLAGS) $(OBJECT_FILES) $(FLATFORM) $(INC_PATH) $(LIBS_PATH) $(LIBS) -o dlg
问题回答

这与图书馆无关,可能与道路无关。 汇编者认为,在所指明的行文上存在yn误,请使用拷贝和过去的方式张贴该行及其周围。

一旦您在法典中确定了辛塔克斯的错误,你就希望改变地理统计局,以包含-lapr-1<>/code>,因为链接器增加了“校准”的预设性。

要么在一名医生身上有yn错,要么可能的话是一名医生,他会把一些事情列入自己。

例如:

页: 1 如果你想将乙.列入Xxx.c号档案,那么你就必须在Xxx.c中添加护str,然后人工装饰,以确保乙.能够查阅大len(......)的声明。

汇编者最可能知道什么是<代码>apr_int32_t,而应当使用。 页: 1

。 我想你的话:

我的<代码>include/apr 编号:apr.h

这可能是错误的。 您的地方名录中不应有apr.h文档,而不应有来自PR的档案。 因此,试图将文档编号include/apr/apr.h重新命名为其他内容(除非有include/apr,你指的是你的系统包括名录)。

<Edit 2

LIBS_PATH -L./lib
INC_PATH -I./include

见上文,请参看<条码>apr来源目录。 请在<代码>apr上安装<>/code>>,在<代码>apr目录上,然后使用<代码>/usr/include/apr和/usr/lib/libapr*上安装的文档,以建立你的方案。 您不应有当地来源,而应列入<代码>apr目录。





相关问题
Fastest method for running a binary search on a file in C?

For example, let s say I want to find a particular word or number in a file. The contents are in sorted order (obviously). Since I want to run a binary search on the file, it seems like a real waste ...

Print possible strings created from a Number

Given a 10 digit Telephone Number, we have to print all possible strings created from that. The mapping of the numbers is the one as exactly on a phone s keypad. i.e. for 1,0-> No Letter for 2->...

Tips for debugging a made-for-linux application on windows?

I m trying to find the source of a bug I have found in an open-source application. I have managed to get a build up and running on my Windows machine, but I m having trouble finding the spot in the ...

Trying to split by two delimiters and it doesn t work - C

I wrote below code to readin line by line from stdin ex. city=Boston;city=New York;city=Chicago and then split each line by ; delimiter and print each record. Then in yet another loop I try to ...

Good, free, easy-to-use C graphics libraries? [closed]

I was wondering if there were any good free graphics libraries for C that are easy to use? It s for plotting 2d and 3d graphs and then saving to a file. It s on a Linux system and there s no gnuplot ...

Encoding, decoding an integer to a char array

Please note that this is not homework and i did search before starting this new thread. I got Store an int in a char array? I was looking for an answer but didn t get any satisfactory answer in the ...

热门标签