RE: [ROOT] compiling error

From: Philippe Canal (pcanal@fnal.gov)
Date: Thu Jul 03 2003 - 01:37:20 MEST


Hi,

As the compiler kindly expressed:
  the setting of --[no_]thread_safe and/or --[no_]exceptions in
  /home/cdfsoft/products/root/v3_03_07cKCC_4_0/Linux+2.2/lib/libCore.so is
  incompatible with previous file(s) in this link.

you are trying to link C++ files that have compiled in modes that are not
compatible.  In this case you have compiled your code with exceptions
enabled, while the ROOT distribution you are using is compiled with
exceptions disabled

Each ROOT distribution provide you with the correct list of flags and
libraries to be compiled and link with via the root-config utility.

Make sure you add the result of
	root-config --cflags
to your compile line:
	CXXFLAGS      = -fPIC +K0 $(shell root-config --cflags)

Cheers,
Philippe


-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Jianrong Deng
Sent: Wednesday, July 02, 2003 4:07 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] compiling error



Dear roottalk,

I get the following message when I compile the file walt.cxx with
Makefile. I have no idea what is wrong. How can I fix it?

Thank you,
Jianrong

--------------------------------------
KCC --one_instantiation_per_object -fPIC +K0
-I/home/cdfsoft/products/root/v3_03_07cKCC_4_0/Linux+2.2/include walt.cxx
-o walt \
-L/home/cdfsoft/products/root/v3_03_07cKCC_4_0/Linux+2.2/lib -lCore -lCint
\
         -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMinuit \
         -lPostscript -lProof -lTree \
         -lGpad -lGui -lGX11 -lRint \

Error: The setting of --[no_]thread_safe and/or --[no_]exceptions in
/home/cdfsoft/products/root/v3_03_07cKCC_4_0/Linux+2.2/lib/libCore.so is
incompatible with previous file(s) in this link.
make: *** [walt] Error 2

------------------------------------

The file walt.cxx is as following:

-------------------------------------

// program walt.cxx
#include "TRint.h"
#include "TCanvas.h"
#include "TLine.h"

int main(int argc, char **argv) {
           TRint theApp("Rint", &argc, argv);
        TCanvas *c1 = new TCanvas();
           TLine *l = new TLine(.1,.2,.8,.7);
            l->Draw();

               theApp.Run();
                          return 0;
}

------------------------------------------

And the Makefile is :

------------------------------------------

ARCH = linuxkcc

ifeq ($(ARCH),linuxkcc)
# Linux with the KAI compiler
CXX           = KCC --one_instantiation_per_object
CXXFLAGS      = -fPIC +K0
LD            = KCC
LDFLAGS       = -O $(shell root-config --cflags)
SOFLAGS       =
endif

walt:
        $(CXX) $(CXXFLAGS) -I$(ROOTSYS)/include walt.cxx -o walt \
        -L$(ROOTSYS)/lib -lCore -lCint \
         -lGraf -lGraf3d -lHist -lHtml -lMatrix -lMinuit \
         -lPostscript -lProof -lTree \
         -lGpad -lGui -lGX11 -lRint \


------------------------------------------------------------



This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:13 MET