LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-13-2004, 08:10 AM   #1
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Rep: Reputation: 15
Invalid ELF header when using Automake/Autoconf


I'm trying to make a pluging for XMMS (=shared object) using Autoconf and Automake. Just started using these tools yesterday and after some trial and error I've finaly managed to get something working (or so I thought). When XMMS tries to load the plugin, it spits out the following error: invalid ELF header.
So now I'm stuck... Here's what I do;

aclocal
autoconf
touch README AUTHORS NEWS ChangeLog
automake -a
./configure

This produces a .la file which I rename to .so and copy to the XMMS plugin directory. Don't know if this is a 'valid' way of doing this.

So what am I doing wrong? I don't get it anymore... Been reading a bunch of tutorials, but the problem with these is that old and new ways of building libraries are mixed...... which is very confusing if you're new to this...

The files;

configure.ac
Code:
AC_INIT([LiQuiD-MP3], [0.1],
		[myname <***>],
		[liquidmp3])

AM_INIT_AUTOMAKE

AC_PROG_CC
AC_PROG_CXX
AM_PROG_LIBTOOL
AC_PROG_INSTALL

AC_CONFIG_FILES([
		Makefile
		src/Makefile])

AC_OUTPUT()
Makefile.am
Code:
EXTRA_DIST = reconf
SUBDIRS = src
src/Makefile.am
Code:
lib_LTLIBRARIES = libliquidmp3.la
AM_CXXFLAGS = -I/usr/include/glib-1.2 -I/usr/lib/glib/include

libliquidmp3_la_SOURCES = liquidmp3_xmms.cpp \
	...etc.cpp
NB, The sourcecode itself is ok. When compiling it by hand (g++ -shared ....) al goes fine and the plugin works.

Last edited by Zotty; 09-17-2004 at 01:22 PM.
 
Old 09-17-2004, 01:23 PM   #2
Zotty
LQ Newbie
 
Registered: Sep 2004
Location: Netherlands
Distribution: Debian testing
Posts: 25

Original Poster
Rep: Reputation: 15
Hasn't anyone got any suggestions?
 
  


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
libpcre invalid ELF header error. geoffd4 Linux - Software 2 01-18-2022 05:12 PM
A problem about autoconf and automake icoming Programming 1 06-02-2005 02:52 AM
"invalid Elf header" after kernel upgrade Goo Slackware 7 10-09-2004 08:32 AM
automake and autoconf troubles... liljim Linux - Software 5 07-28-2004 09:18 PM
Autoconf and Automake are broken... Nigh Unstoppabl Mandriva 0 07-18-2004 10:49 PM

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

All times are GMT -5. The time now is 11:33 PM.

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