If you're on Linux, why do your executables have .exe extensions?
I take it the tabs have been lost because you've not used the code format tag.
I take it the first makefile works and the second one is problematic. Is that right? I'll just comment on the second one from here.
I'm not clear on why you need to specify the compiler include file (with C++INC) and the C++ runtime libs (in CILIBLAY). Linking with g++ (or icc) will find them. However, I can't be sure that C++INC is actually used.
The problematic -lBasicDet is present (in ALPINEDIR_LIBS), so that's ok. And it appears before the complaining libTKLayout, so that's good too.
I would expect that custom compile line to appear after
those macro definitions. But I can't see where it appears or the rule that invokes it.
$(CXX) -fopenmp $(CILIBLAY) $(OUT_OBJS) $(OBJDIR)/$(MAIN_PROG).o -o $(MAIN_PROG).exe
Going back to your original post, ...
Don't mix -g and -O2.
|TrivialROUSetter is only declared in a file.h is not defined in file.cc I have a hunch that the g+ + compiler for opensuse needs a flags for is seeking definitions includes *. h if it is necessary unlike g+ + mac-os
The behaviour of gcc is consistent across platforms except where there are platform variances.
Anyway, if the methods of TrivialROUSetter are defined as inline and are accessible from the .h file, then it ought to be ok. Does the .h have the implementation of the methods or just the definitions?
Also, you should order the link such that the local objs appear first, then the shared libs. With gcc, the order is important. It will ignore duplicate symbols in following libs. Your lib appears before
the object files. You should fix that.
Lets just go thru them one at a time.
Where does the implementation for TrivialROUSetter::set(Module) live? Is it in a .h file? If so is it inline? If it's in a compiled module, does the linker see it before the module that uses it?
Apply the same reasoning to each of the problem symbols:
FixTIDTopology::recreateTopologies() accessed from libTkLayout.so
TkDetTypeName::shortName(DetType const&) accessed from libSmearingClusterizers.so
DetUnitGluer::glue accessed from libTkLayout.so ...