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
|