RE: [ROOT] rootcint problem, again

From: Philippe Canal (pcanal@fnal.gov)
Date: Wed Jun 25 2003 - 17:46:30 MEST


Hi Michal,

I have no problem with your files.  For any further diagnosis I would need:
	- the actual command line which produce the error
	- the complete output of executing it
and then to reproduce it I would need
	- MyMainFrame.h and ALL the files (except for those in /usr/include and $ROOTSYS/include that it includes directly or indirectly
	- the linkdef file used on the rootcint command line

Cheers,
Philippe.

-----Original Message-----
From: Michal Lijowski [mailto:michal@cvu.wustl.edu]
Sent: Wednesday, June 25, 2003 9:43 AM
To: Philippe Canal; roottalk@pcroot.cern.ch
Subject: RE: [ROOT] rootcint problem, again


Hello Philip,


The definitions of all data types etc are in m-defs.h file being part of the
xmedcon software. I attached this file. The m-defs.h file depends on two
more
header files which are also part of the xmedcon package. I think this could
be
be a problem.

Thank you.

Best regards,

Michal


-----Original Message-----
From: Philippe Canal [mailto:pcanal@fnal.gov]
Sent: Tuesday, June 24, 2003 2:57 PM
To: Michal Lijowski; roottalk@pcroot.cern.ch
Subject: RE: [ROOT] rootcint problem, again


Hi Michal,

Where is the definition of Int16 located?

It looks like rootcint did not see that file (the part right part of it).
Is it in a system header or in medcon header?  If it is in a medcon header,
the likely cause is the fact that MyMainFrame.h does not include (by
induction or not).

Cheers,
Philippe.

-----Original Message-----
From: owner-roottalk@pcroot.cern.ch
[mailto:owner-roottalk@pcroot.cern.ch]On Behalf Of Michal Lijowski
Sent: Tuesday, June 24, 2003 1:41 PM
To: roottalk@pcroot.cern.ch
Subject: [ROOT] rootcint problem, again



Hello,

I have another problem. This time is related to rootcint.
I created a DicomImage class which reads Dicom images using xmedcon software
written in C. This part works fine when I test it. I am trying
to combine DicomImage class with MyMainFrame class using following
Makefile.

#
#         Makefile for MyMain
#

ROOTCFLAGS   := $(shell root-config --cflags)
ROOTLIBS     := $(shell root-config --libs)
MEDCONCFLAGS := $(shell /usr/local/medcon/bin/medcon-config --cflags)
MEDCONLIBS   := $(shell /usr/local/medcon/bin/medcon-config --libs)
CXXFLAGS      = -g -v
CXXFLAGS     += $(MEDCONCFLAGS)
CXXFLAGS     += -I/home/michal/Tests/DicomImage

LIBS	+= $(ROOTLIBS)
LIBS	+= -L/home/michal/Tests/DicomImage -lDicomImage
LIBS	+= $(MEDCONLIBS)

CC = g++

all: MyMainFrameDict.cxx MyMainFrameDict.o MyMainFrame.o MyMain

MyMainFrameDict.cxx: MyMainFrame.h MyMainFrameLinkDef.h
	@echo "Generating Dictionary $@..."
	@rootcint -f $@ -c $(CXXFLAGS) -p $^

MyMainFrameDict.o: MyMainFrameDict.cxx
	@echo "Compiling $< ..."
	@$(CC) -g -Wno-deprecated $(ROOTCFLAGS) -c $^

MyMainFrame.o:       MyMainFrame.cxx MyMainFrame.h
	@echo "Compiling $< ..."
	@$(CC) -g -Wno-deprecated $(CXXFLAGS) $(ROOTCFLAGS) -c MyMainFrame.cxx

MyMain: MyMain.cxx MyMainFrame.o MyMainFrameDict.o
	@echo "Compiling $< ..."
	@$(CC) -g -Wno-deprecated $(CXXFLAGS) $(ROOTCFLAGS) $(LIBS) $^ -o $@

############### End of Makefile ################

The problem is in the first step when rootcint tries to generate
MyMainFrameDict.cxx.
This step involves headers from medcon library. In these headers there are
new
types which seem to be unrecognized by rootcint.
So, I get a bunch of errors like these

Error: Symbol Int16Samples_Per_Pixel is not defined in current scope
FILE:/usr/local/medcon/include/m-structs.h LINE:70
Error: Symbol Int16start_time_hour is not defined in current scope
FILE:/usr/local/medcon/include/m-structs.h LINE:95
Error: Symbol Int16start_time_minute is not defined in current scope
FILE:/usr/local/medcon/include/m-structs.h LINE:96
Error: Symbol Int16start_time_second is not defined in current scope
FILE:/usr/local/medcon/include/m-structs.h LINE:97

where Int16 is defined as

/* 16 bit type */
#ifdef SHORT_2BYTE
 typedef          short Int16;
 typedef unsigned short Uint16;
#elif  INT_2BYTE
 typedef          int   Int16;
 typedef unsigned int   Uint16;
#endif

Is any work around this problem? I appreciate any suggestions.

  Michal

P.S. My platform is RH Linux 9.0, gcc 3.2.2, and root 3.5/5.



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