Welcome to Open Discussion

2010-03-02
2013-04-15
  • Victor Pérez
    Victor Pérez
    2010-03-02

    Welcome to Open Discussion

     
  • Hi Victor i've tried to compile yor plugins in my amd64 system (ubuntu9.10 amd64)
    but i get the next message error

    make: se ingresa al directorio `/home/monon/Escritorio/DynamicMultiband-0.0.1/plugin'
    gcc dynamicmultiband.o -o dynamicmultiband.so -shared -Lutil -lc -lm  -linv_util -fPIC -DPIC
    /usr/bin/ld: dynamicmultiband.o: relocation R_X86_64_32S against `lin_data' can not be used when making a shared object; recompile with -fPIC
    dynamicmultiband.o: could not read symbols: Bad value
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: se sale del directorio `/home/monon/Escritorio/DynamicMultiband-0.0.1/plugin'
    make: ***  Error 2

    ive tried to complie without -shared option in plugin makefile but i get another error:

    make: se ingresa al directorio `/home/monon/Escritorio/compressor_sc4_GUI-0.0.1/plugin'
    gcc plugin.o -o plugin.so -Lutil -lc -lm  -linv_util -fPIC -DPIC
    /usr/lib/gcc/x86_64-linux-gnu/4.4.1/../../../../lib/crt1.o: In function `_start':
    /build/buildd/eglibc-2.10.1/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to `main'
    collect2: ld returned 1 exit status
    make: ***  Error 1
    make: se sale del directorio `/home/monon/Escritorio/compressor_sc4_GUI-0.0.1/plugin'
    make: ***  Error 2

    I dont know what to do to compile it.
    If you could help me ….  What am I doing wrong?? Thanks

     
  • Victor Pérez
    Victor Pérez
    2010-04-03

    Hi Juan Ramon.

    Please, replace the makefile script in the plugin folder (where is the dynamicmultibaand.c) with this script:
    _

    #   This program is free software; you can redistribute it and/or modify
    #   it under the terms of the GNU General Public License as published by
    #   the Free Software Foundation; either version 2 of the License, or
    #   (at your option) any later version.
    #
    #   This program is distributed in the hope that it will be useful,
    #   but WITHOUT ANY WARRANTY; without even the implied warranty of
    #   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    #   GNU General Public License for more details.
    #
    #   You should have received a copy of the GNU General Public License
    #   along with this program; if not, write to the Free Software
    #   Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
    #
    #  

    # GENERAL

    CC = gcc
    LD = ld
    CFLAGS = -shared -O3 -Lutil -lc -lm  -linv_util -fomit-frame-pointer -fstrength-reduce -funroll-loops -ffast-math -c -fPIC -DPIC

    all: dynamicmultiband.so

    # RULES TO BUILD LIBRARIES FROM C CODE

    dynamicmultiband.so: dynamicmultiband.o dynamicmultiband.c \

    @echo "Creando Dynamicmultiband.so"
    @ar rcs dyhnamicmultiband.so

    # OTHER TARGETS

    targets: dynamicmultiband.so

    always:

    clean:
    -rm -f *.a
    -rm -f *.o
    -rm -f *~

    %.o: %.c
    @echo "Compiling $<"
    @$(CC) -c $(CPPFLAGS) $(CFLAGS) $< -o $@ _

    If it works please tell me.

    Thanks.