Hello everyone

I am trying to generate a dynamic library with integration of NIM and 
PostgreSQL, it works very well in Ubuntu, but in macOS it generates the 
following error
    
    
    ld: warning: ignoring file Makefile, building for macOS-x86_64 but 
attempting to link with file built for unknown-unsupported file format ( 0x50 
0x47 0x5F 0x53 0x45 0x52 0x56 0x45 0x52 0x5F 0x49 0x4E 0x43 0x3D 0x20 0x24 )
    
    
    Run

Este es el make file con el que trato de generar la bibilioteca dinamica
    
    
    # Objetos de C
    MY_OBJS=addone.o magic.o utilities.o concat.o
    
    all: $(MY_LIB_NIM) $(MY_OBJS) $(MY_LIB_GCC)
            @echo Compilacion en Nim culminada con exito!!!
    
    $(MY_LIB_NIM): *.nim Makefile
            nim c -d:release --gc:arc -d:useMalloc --passC:-fPIC --noMain 
--opt:speed --app:staticlib --outdir:$(NIM_OUTDIR) --nimcache:$(NIM_CACHEDIR) 
--out:$(basename $<).a --header:$(basename $<).h $<
    
    %.o: %.c Makefile
            gcc -std=c11 -fPIC -O2 -D_GNU_SOURCE -c $< -I$(PG_SERVER_INC) 
-I$(NIM_INCLUDE_BASE) -I$(NIM_INCLUDE_LOCAL)
    
    $(MY_LIB_GCC): $(MY_OBJS) Makefile
            gcc -shared -fPIC -O2 $^ $(MY_LIB_NIM) -o $@
    
    
    Run

Any solution for this error?

Thank you!

Reply via email to