I am working with an open source project called snort , which is written in C, under Linux. I opened project in netbeans correctly and now I am going to do some changes in this source code. The src folder of program contains several folders and also each folder has some folders. I heard that netbeans is able to generate make files. I am doing some changes in src files in folder XFolder and want to use a library function in another folder in my project (YFolder). I included .h file and used the function correctly.
#include"../YFolder/lib.h"
现在,当我能够汇编节目时,我是奥基,但当我使用在制作过程中创建的有活力的图书馆“(共有物体档案)”时,我看到了一个错误,即是指我从没有界定的其他文件中使用的功能,并看到这一错误;(fxhash_new是我所说的外部功能的名称)。
libsf_sip_preproc.so: undefined symbol: sfxhash_new
我还编辑了《马克茨》。 (。 但效果不佳。 谁能帮助我?
EDIT:
I am in folder src/dynamic-preprocessor/sip I want to use a function in file: src/sfutil/sfxHash.c the function name is sfxhash_new(... ... ...) I included sfxHash.h correctly. I did some changes In my Makefile.am but the main makefile is this.
MyMakfile.am file:
## $Id
AUTOMAKE_OPTIONS=foreign no-dependencies
INCLUDES = -I../include -I${srcdir}/../libs -I$(srcdir)/includes
libdir = ${exec_prefix}/lib/snort_dynamicpreprocessor
lib_LTLIBRARIES = libsf_sip_preproc.la
libsf_sip_preproc_la_LDFLAGS = -shared -export-dynamic -module @XCCFLAGS@
if SO_WITH_STATIC_LIB
libsf_sip_preproc_la_LIBADD = ../libsf_dynamic_preproc.la
else
nodist_libsf_sip_preproc_la_SOURCES =
../include/sf_dynamic_preproc_lib.c
../include/sf_ip.c
endif
libsf_sip_preproc_la_SOURCES =
spp_sip.c
spp_sip.h
sip_config.c
sip_config.h
sip_parser.c
sip_parser.h
sip_dialog.c
sip_dialog.h
sip_roptions.c
sip_roptions.h
sip_utils.c
sip_utils.h
sip_debug.h
../include/sfxhash.c -----------------> I have copied src files in this dictionary
../include/sfxhash.h ------------------>
EXTRA_DIST =
sf_sip.dsp
all-local: $(LTLIBRARIES)
$(MAKE) DESTDIR=`pwd`/../build install-libLTLIBRARIES