linking problem... file not recognized: File format not recognized

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fantasticamir
    New Member
    • Apr 2007
    • 42

    linking problem... file not recognized: File format not recognized

    I have a simple program using a couple of classes and it compiled successfully but while it is linking I have the following problem:

    g++ -Wall -lcu -lglu ACL2MDD.o Link.o Rule.o reachability.o -o Reachability
    Link.o: file not recognized: File format not recognized
    collect2: ld returned 1 exit status
    make: *** [Reachability] Error 1

    Another observation is the Link.o and Rule.o files, both of them are HUGE (20 MB) which is odd because the classes are so small.

    The following is my make file:
    Code:
    # Compiler/Linker
    CC = g++
    LD = g++
    
    # files removal
    RM = /bin/rm -f
    
    CFLAGS = -Wall
    LDFLAGS = -Wall
    
    MDDLIBS= -lcu -lglu
    
    # program's object files
    PROG_OBJS =  ACL2MDD.o Link.o Rule.o reachability.o 
    
    # program's executable
    PROG = Reachability
    
    # top-level rule
    all: $(PROG)
    
    $(PROG): $(PROG_OBJS)
    	$(LD) $(LDFLAGS) $(MDDLIBS) $(PROG_OBJS)  -o $(PROG)
    
    
    Rule.o:  Rule.h
    	$(CC) $(CFLAGS) $(MDDLIBS) -c Rule.h -o Rule.o
    
    ACL2MDD.o: ACL2MDD.cpp ACL2MDD.h
    	$(CC) $(CFLAGS)  $(MDDLIBS) -c ACL2MDD.cpp -o ACL2MDD.o 
    
    Link.o:  Link.h
    	$(CC) $(CFLAGS)  -c Link.h -o Link.o
    reachability.o:  reachability.cpp ACL2MDD.cpp ACL2MDD.h
    	$(CC) $(CFLAGS)   $(MDDLIBS) -c reachability.cpp -o reachability.o
    
    
    # clean everything
    clean:
    	$(RM) $(PROG_OBJS) $(PROG)


    Any idea?
    Thanks for your help in advance...

    Amir.
Working...