Thank you for your answers. Moving -lopenbabel didn't work for me, but using
Noel's suggestion I found a way to make a working Makefile (even if cmake is
working perfectly fine).

If someone faces the same problems, here is my Makefile:

TARGET  =example.exe
SOURCES =example.cpp
OBJECTS =$(SOURCES:.cpp=.o)

CC      =g++
CFLAGS  =-O2 -Wall
INCLUDE =-I/home/nicolas/Programmes/OpenBabel-2.3.2/include/openbabel-2.0
LDFLAGS =-rdynamic
/home/nicolas/Programmes/OpenBabel-2.3.2/lib/libopenbabel.so
-Wl,-rpath,/home/nicolas/Programmes/OpenBabel-2.3.2/lib
LIBS    =-lm

all: $(TARGET)

$(TARGET): $(OBJECTS)
        $(CC) $(OBJECTS) -o $(TARGET) $(LDFLAGS)

.cpp.o:
        $(CC) $(CFLAGS) $(INCLUDE) $(LIBS) -c $< -o $@

clean:
        rm *.o


Nicolas




--
View this message in context: 
http://forums.openbabel.org/Problem-for-compiling-the-example-files-tp4656837p4656892.html
Sent from the General discussion mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Shape the Mobile Experience: Free Subscription
Software experts and developers: Be at the forefront of tech innovation.
Intel(R) Software Adrenaline delivers strategic insight and game-changing 
conversations that shape the rapidly evolving mobile landscape. Sign up now. 
http://pubads.g.doubleclick.net/gampad/clk?id=63431311&iu=/4140/ostg.clktrk
_______________________________________________
OpenBabel-discuss mailing list
OpenBabel-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/openbabel-discuss

Reply via email to