LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2011, 05:16 PM   #1
hedpe
Member
 
Registered: Jan 2005
Location: Boston, MA
Distribution: Debian
Posts: 380

Rep: Reputation: 30
.sym not being generated by -export-symbols in Makefile.am


I am trying to build a shared library by editing Wireshark's Makefile.am to create a "libtshark" ... to do this, I am trying to build a tshark_lib.c which is the same as tshark.c with main() stripped out of it.

So I have edited Makefile.am to include include the following in an attempt to build the shared libtshark library:

Code:
    lib_LTLIBRARIES = libtshark.la
    libtshark_la_LDFLAGS = -version-info 0:1:0 -export-symbols libtshark.sym @LDFLAGS_SHAREDLIB@
    libtshark_la_SOURCES = \
    	$(WIRESHARK_COMMON_SRC)	\
    	$(SHARK_COMMON_CAPTURE_SRC) \
    	$(TSHARK_TAP_SRC)	\
    	capture_opts.c		\
    	capture_sync.c		\
    	tempfile.c		\
    	tshark-tap-register.c	\
    	tshark_lib.c
    
    # Libraries and plugin flags with which to link tshark.
    libtshark_la_LIBADD = \
    	wiretap/libwiretap.la		\
    	epan/libwireshark.la		\
    	wsutil/libwsutil.la		\
    	@SSL_LIBS@			\
    	$(plugin_ldadd)			\
    	@PCRE_LIBS@			\
    	@GLIB_LIBS@ -lm			\
    	@PCAP_LIBS@			\
    	@SOCKET_LIBS@			\
    	@NSL_LIBS@			\
    	@C_ARES_LIBS@			\
    	@ADNS_LIBS@			\
    	@KRB5_LIBS@			\
    	@CORESERVICES_FRAMEWORKS@	\
    	@LIBGCRYPT_LIBS@		\
    	@LIBGNUTLS_LIBS@		\
    	@LIBSMI_LDFLAGS@
    #tshark_CFLAGS = $(AM_CLEAN_CFLAGS) $(py_dissectors_dir)
    
    libtshark_la_DEPENDENCIES = \
    	${top_builddir}/epan/libwireshark.la \
    	${top_builddir}/wsutil/libwsutil.la \
    	${top_builddir}/wiretap/libwiretap.la \
            libtshark.sym
However, when I try to build the code now, **I get the following error:**

Code:
    make[2]: *** No rule to make target `libtshark.sym', needed by `libtshark.la'.  Stop.
For some reason, it is not using my 'libtshark_la_LDFLAGS' which contains '-export-symbols libtshark.sym' ... does anyone know what I might be missing?

Here is the entire Makefile.am, which is very long: http://pastebin.com/Xc5AZ1Yx
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to export function symbols? cpthk Programming 8 08-28-2009 09:04 AM
How to export reports generated in Linux to excel sheets. sumitdevbharadwaj Programming 4 12-29-2008 11:18 PM
ISO C++ make errors and CMake generated Makefile xpromisex Programming 2 04-15-2007 06:48 PM
Accessing import and export symbols ? unclesam Linux - Newbie 2 01-11-2006 08:14 AM
beginners problem: autotools' generated makefile not doing anything sterrenkijker Programming 2 03-31-2005 02:14 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration