RE: [ROOT] rootcint problem, again

From: Philippe Canal (pcanal@fnal.gov)
Date: Tue Jun 24 2003 - 21:57:26 MEST


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