Afficher un message
Vieux 26/02/2008, 20h59   #4
prlawrence
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Undefined symbols error for barebones OO attempt


Christopher wrote:
> [snip]
> You did not compile Occi_Dml.cpp
> read up on using g++ or using a makefile.


and red floyd wrote:
> [snip]
> You didn't compile OcciDml.cpp with occi_dump.cpp, so of
> course the symbols defined there aren't found.


Thanks to you both, I wrote a makefile which seems to correctly
compile and link:

$ make
g++ -Wall -c occi_dump.cpp
g++ -Wall -c OcciDml.cpp
g++ -Wall -o occi_dump occi_dump.o OcciDml.o

$ cat Makefile
CC = g++
CFLAGS = -Wall
OBJECTS = occi_dump.o OcciDml.o

occi_dump : $(OBJECTS)
$(CC) $(CFLAGS) -o $@ $(OBJECTS)

%.o : %.cpp
$(CC) $(CFLAGS) -c $<

clean:
rm -rf *.o occi_dump

  Réponse avec citation
 
Page generated in 0,04345 seconds with 9 queries