Hi,
I tried deleting and re-installing but couldn’t get things to work. So I went back to the Win32 version, which as I mentioned before I have always used before.
In any case, so I decided to try to get the Makefile for ExootAnalysis to compile. I had to changed some flags compared to the Makefile in the test directory, namely, I had to add the option -Fo to get the object files in the directories where I wanted them:
@$(CXX) $(CXXFLAGS) -Fo$@ -c $<
whee CXX and CXXFLAGS are as defined in Makefile.arch in the test directoy:
ifeq ($(ARCH),win32)
# Windows with the VC++ compiler
VC_MAJOR := $(shell unset VS_UNICODE_OUTPUT; cl.exe 2>&1 | awk '{ if (NR==1) print $$(NF-2) }' | \
cut -d'.' -f1)
ObjSuf = obj
SrcSuf = cxx
ExeSuf = .exe
DllSuf = dll
OutPutOpt = -out:
CXX = cl
ifeq (debug,$(findstring debug,$(ROOTBUILD)))
CXXOPT = -Z7
LDOPT = -debug
else
ifneq ($(findstring debug, $(strip $(shell $(RC) --config))),)
CXXOPT = -Z7
LDOPT = -debug
else
CXXOPT = -O2
LDOPT = -opt:ref
endif
endif
ROOTINCDIR := -I$(shell cygpath -m `$(RC) --incdir`)
CXXFLAGS = $(CXXOPT) $(ROOTINCDIR) -FIw32pragma.h
LD = link
LDFLAGS = $(LDOPT)
SOFLAGS = -DLL
EXPLLINKLIBS = $(ROOTLIBS) $(ROOTGLIBS)
ifneq (,$(findstring $(VC_MAJOR),14 15))
MT_EXE = mt -manifest $@.manifest -outputresource:$@\;1; rm -f $@.manifest
MT_DLL = mt -manifest $@.manifest -outputresource:$@\;2; rm -f $@.manifest
else
MT_EXE =
MT_DLL =
endif
endif
But also added:
CXXFLAGS += -MD -EHsc -GR -I'c:\root\include' -I. -I'c:\root\lib\ExRootAnalysis\tcl' -I'c:\root\lib\ExRootAnalysis\mcfio' -I'c:\root\lib\ExRootAnalysis\stdhep' -I'c:\root\lib\ExRootAnalysis\CDFCones' -I'c:\root\lib\ExRootAnalysis\CDFCones\CDFcode'
LIBS = $(ROOTLIBS) $(SYSLIBS) MSVCRT.LIB
GLIBS = $(ROOTGLIBS) $(SYSLIBS)
EVENTLIB =lib/libExRootAnalysis.lib
Now all the files compile correctly, but when trying to build the dll I get errors:
ExRootAnalysisDict.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::DoError(int,char const *,char const *,char *)const " (?DoError@TObject@@UBEXHPBD0PAD@Z)
ModulesDict.obj : error LNK2001: unresolved external symbol "public: virtual void __thiscall TObject::DoError(int,char const *,char const *,char *)const " (?DoError@TObject@@UBEXHPBD0PAD@Z)
lib/libExRootAnalysis.dll : fatal error LNK1120: 1 unresolved externals
Makefile:888: recipe for target `lib/libExRootAnalysis.dll' failed
make: *** [lib/libExRootAnalysis.dll] Error 96
e]0;/cygdrive/c/root/ExRootAnalysisa
e[32mNausheen@Nausheen-Laptop e[33m/cygdrive/c/root/ExRootAnalysise[0m
$ exit
exit
When I look at the output from the makefile, specifically while building the libraries, I see that in fact TObject::DoError was found, but with a different set of numbers after the @, I have no idea what that means:
Found "protected: virtual void __thiscall TObject::DoError(int,char const *,char const *,char *)const " (?DoError@TObject@@MBEXHPBD0PAD@Z)
Referenced in MadGraphClassFilter.obj
Referenced in MadGraphConeJetFinder.obj
Referenced in MadGraphKtJetFinder.obj
Referenced in ExRootTask.obj
Referenced in ExRootTreeReader.obj
Referenced in ExRootTreeWriter.obj
Referenced in MadGraphAnalysis.obj
Referenced in ExRootAnalysis.obj
Referenced in ExRootConfReader.obj
Referenced in ExRootFactory.obj
Referenced in ExRootModule.obj
Loaded libCore.lib(libCore.dll)
The relevant code in the Makefile is (I added -verbose to the lib command to see what was going on):
$(SHARED): $(DICT_OBJ) $(SOURCE_OBJ) $(TCL_OBJ)
@mkdir -p $(@D)
@echo ">> Building shared $@"
ifeq ($(ARCH),aix)
@/usr/ibmcxx/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^
else
ifeq ($(ARCH),aix5)
@/usr/vacpp/bin/makeC++SharedLib $(OutPutOpt) $@ $(LIBS) -p 0 $^
else
ifeq ($(PLATFORM),macosx)
# We need to make both the .dylib and the .so
@$(LD) $(SOFLAGS)$@ $^ $(OutPutOpt) $@
@$(LD) -bundle -undefined $(UNDEFOPT) $(LDFLAGS) $^ $(LIBS) $(OutPutOpt) $(subst .$(DllSuf),.so,$@)
else
ifeq ($(PLATFORM),win32)
# @bindexplib $* $^ > $*.def
@bindexplib $* $^ > $*.def
@echo ">> build shared platform $@"
@echo ">> $^ "
@echo ">> $* "
# @lib -MACHINE:X86 $^ -def:$*.def $(EVENTLIB) $(OutPutOpt) > $@
@lib -nologo -verbose -MACHINE:X86 $^ -implib:$*.lib -def:$*.def $(OutPutOpt)$(EVENTLIB) $(GLIBS)
@echo ">> build shared platform $@ done libstuff"
@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $*.exp $(GLIBS) $(OutPutOpt)$@
@echo ">> build shared platform $@"
$(MT_DLL)
else
@echo ">>diff plat build shared platform $@"
@$(LD) $(SOFLAGS) $(LDFLAGS) $^ $(OutPutOpt) > $@ $(EXPLLINKLIBS)
@$(MT_DLL)
endif
endif
endif
endif
I dont seem to be able to upload my makefile or the makefile.arch. I am attaching the output from the Makefile as a txt file…
Thank you a million in advance… I must be doing something dumb… I know…
makelog.txt (268 KB)