ASE Home Page Products Download Purchase Support About ASE
ChartDirector Support
Forum HomeForum Home   SearchSearch

Message ListMessage List     Post MessagePost Message

  Problem in linking
Posted by Babak on Oct-05-2016 16:00
I try to link my gantt.cpp to other project but it have problem.
My make file :

SYSTEM = x86_sles10_4.1
LIBFORMAT = static_pic

SYSTEM = x86-64_sles10_4.1
LIBFORMAT = static_pic

ILOGSTUDIODIR =/opt/ibm/ILOG/CPLEX_Enterprise_Server126/CPLEX_Studio/
CPLEXDIR = $(ILOGSTUDIODIR)/cplex
CONCERTDIR = $(ILOGSTUDIODIR)/concert


CPLEXBINDIR = $(CPLEXDIR)/bin/$(BINDIST)
CPLEXLIBDIR = $(CPLEXDIR)/lib/$(SYSTEM)/$(LIBFORMAT)
CONCERTLIBDIR = $(CONCERTDIR)/lib/$(SYSTEM)/$(LIBFORMAT)

CCLNFLAGS = -L$(CPLEXLIBDIR) -lilocplex -lcplex -L$(CONCERTLIBDIR) -lconcert  -lm -pthread

CCFLAGS = -O -fPIC -fexceptions -DNDEBUG -DIL_STD


XML_INCLUDES=-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/glibmm-2.4 -I/usr/lib/x86_64-linux-gnu/glibmm-2.4/include -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml++-2.6 -I/usr/lib/libxml++-2.6/include -std=gnu++11
CPLEX_INCLUDES=-I/usr/include/giomm-2.4 -I/usr/include/sigc++-2.0 -I/usr/lib/x86_64-linux-gnu/sigc++-2.0/include -I/usr/include/giomm-2.4/giomm/ -Iinclude -I/opt/ibm/ILOG/CPLEX_Enterprise_Server126/CPLEX_Studio/opl/include -I/opt/ibm/ILOG/CPLEX_Enterprise_Server126/CPLEX_Studio/cplex/include -Iinclude/ilcplex/
CPLEX_LIBS=-L/opt/ibm/ILOG/CPLEX_Enterprise_Server126/CPLEX_Studio/cplex/lib/x86-64_linux/static_pic -L/opt/ibm/ILOG/CPLEX_Enterprise_Server126/CPLEX_Studio/concert/lib/x86-64_linux/static_pic


GANTT_CFLAGS = -I../../include -L../../lib -Wl,-R../../lib


INCLUDE_FILES= scheduler.h xmlparser.h models.h metascheduler.h outputs.h visualize.h

all: xmlparser.o main.o models.o scheduler.o metascheduler.o outputs.o visualize.o
g++ $(CPLEX_LIBS) -L../xml/lib -Wl,-R../xml/lib -lchartdir $(CCFLAGS) models.o xmlparser.o main.o outputs.o scheduler.o metascheduler.o visualize.o -o sched `pkg-config --cflags --libs libxml++-2.6` $(CCLNFLAGS)


main.o: main.cpp $(INCLUDE_FILES)
@g++ $(XML_INCLUDES) -c main.cpp

visualize.o: visualize.cpp $(INCLUDE_FILES)
@g++ $(GANTT_CFLAGS) -I./gantt  -c visualize.cpp

outputs.o: outputs.cpp $(INCLUDE_FILES)
@g++ $(XML_INCLUDES) -c outputs.cpp

xmlparser.o: xmlparser.cpp $(INCLUDE_FILES)
@g++ $(XML_INCLUDES) -c xmlparser.cpp

metascheduler.o: metascheduler.cpp $(INCLUDE_FILES)
@g++ $(INCLUDES) -std=c++11 -c metascheduler.cpp

scheduler.o: scheduler.cpp $(INCLUDE_FILES)
@g++ scheduler.cpp  $(XML_INCLUDES) ${CPLEX_INCLUDES}  -c scheduler.cpp  $(CCFLAGS)

models.o: models.cpp $(INCLUDE_FILES)
@g++ $(INCLUDES) -std=c++11 -c models.cpp

clean:
rm *.o sched *~

  Re: Problem in linking
Posted by Peter Kwan on Oct-07-2016 14:17
Hi,

In case anyone is reading this thread, the response is at the following thread:

http://www.chartdir.com/forum/download_thread.php?site=chartdir&bn=chartdir_support&thread=1417677102#N1475661650

Regards
Peter Kwan