g++ -O -pthread -g -I. -I/home/myhome/ia-k_L/src/global/include -I/home/myhome/ia-k_L/src/gias/include Datagrid.cc /home/myhome/ia-k_L/src/gias/obj/Datagrid.o -o Datagrid
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o: In function `__static_initialization_and_destruction_0':
/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: multiple definition of `Column::Names'
/tmp/cc3cQa7z.o:/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o: In function `charArray':
/home/myhome/ia-k_L/src/gias/include/DataGrid.h:602: multiple definition of `Column::DbNames'
/tmp/cc3cQa7z.o:/home/myhome/ia-k_L/src/gias/include/DataGrid.h:602: first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x0): multiple definition of `Column::default_link'
/tmp/cc3cQa7z.o:(.data+0x0): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x14): multiple definition of `Column::default_font'
/tmp/cc3cQa7z.o:(.data+0x14): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x1a): multiple definition of `Column::default_fontSize'
/tmp/cc3cQa7z.o:(.data+0x1a): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x20): multiple definition of `Column::default_fontColor'
/tmp/cc3cQa7z.o:(.data+0x20): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x30): multiple definition of `Column::default_color'
/tmp/cc3cQa7z.o:(.data+0x30): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x40): multiple definition of `Column::default_verAlignment'
/tmp/cc3cQa7z.o:(.data+0x40): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x48): multiple definition of `Column::default_horAlignment'
/tmp/cc3cQa7z.o:(.data+0x48): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o: In function `__static_initialization_and_destruction_0':
/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: multiple definition of `Column::default_numDec'
/tmp/cc3cQa7z.o:/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x60): multiple definition of `fdTypeCodes'
/tmp/cc3cQa7z.o:(.data+0x60): first defined here
/xenv/GCC/X/4.1.2r5_64/RH5.6AS_64/usr/bin/../lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
ia64make[4]: *** [Datagrid] Error 1
The make file is something like below, also don't know why one of the dependency is calling the same make file inside itself some think like this "$(GIAS_DATAGRID)/makefile" , this is basicaly pointing to same makefile it is in.. I guess it could be to check if the make file was changed(different timestamp)
Make file is calling some impilicit command after the target is finished building don't know why is it behaving that way. below is full code from make file , I removed the unessary echo messages. but kept this echo message "Done with building Datagrid.o" this will say that target finished building then don't know why another command is getting executed after this.
ia64make[4]: Entering directory `/home/myhome/ia-k_L/src/gias/src/datagrid'
--
ia:src:gias:src:datagrid building datagrid.o
g++ -O -pthread -g -I. -I/home/myhome/ia-k_L/src/global/include -I/home/myhome/ia-k_L/src/gias/include -c /home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc -o /home/myhome/ia-k_L/src/gias/obj/Datagrid.o
Done with building Datagrid.o
g++ -O -pthread -g -I. -I/home/myhome/ia-k_L/src/global/include -I/home/myhome/ia-k_L/src/gias/include Datagrid.cc /home/myhome/ia-k_L/src/gias/obj/Datagrid.o -o Datagrid
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o: In function `__static_initialization_and_destruction_0':
/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: multiple definition of `Column::Names'
/tmp/ccQgHfWe.o:/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o: In function `charArray':
/home/myhome/ia-k_L/src/gias/include/DataGrid.h:602: multiple definition of `Column::DbNames'
/tmp/ccQgHfWe.o:/home/myhome/ia-k_L/src/gias/include/DataGrid.h:602: first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x0): multiple definition of `Column::default_link'
/tmp/ccQgHfWe.o:(.data+0x0): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x14): multiple definition of `Column::default_font'
/tmp/ccQgHfWe.o:(.data+0x14): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x1a): multiple definition of `Column::default_fontSize'
/tmp/ccQgHfWe.o:(.data+0x1a): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x20): multiple definition of `Column::default_fontColor'
/tmp/ccQgHfWe.o:(.data+0x20): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x30): multiple definition of `Column::default_color'
/tmp/ccQgHfWe.o:(.data+0x30): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x40): multiple definition of `Column::default_verAlignment'
/tmp/ccQgHfWe.o:(.data+0x40): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x48): multiple definition of `Column::default_horAlignment'
/tmp/ccQgHfWe.o:(.data+0x48): first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o: In function `__static_initialization_and_destruction_0':
/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: multiple definition of `Column::default_numDec'
/tmp/ccQgHfWe.o:/home/myhome/ia-k_L/src/gias/src/datagrid/Datagrid.cc:12170: first defined here
/home/myhome/ia-k_L/src/gias/obj/Datagrid.o:(.data+0x60): multiple definition of `fdTypeCodes'
/tmp/ccQgHfWe.o:(.data+0x60): first defined here
/xenv/GCC/X/4.1.2r5_64/RH5.6AS_64/usr/bin/../lib/gcc/x86_64-redhat-linux/4.1.2/../../../../lib64/crt1.o: In function `_start':
(.text+0x20): undefined reference to `main'
collect2: ld returned 1 exit status
ia64make[4]: *** [Datagrid] Error 1
ia64make[4]: Leaving directory `/home/myhome/ia-k_L/src/gias/src/datagrid'
With build commands for Datagrid do you mean this command "g++ -O -pthread -g -I. -I/home/myhome/ia-k_L/src/global/include -I/home/myhome/ia-k_L/src/gias/include Datagrid.cc /home/myhome/ia-k_L/src/gias/obj/Datagrid.o -o Datagrid" this is getting executed implicitly by make and its giving the problem..
Update from my side, I was able to disable the implicit behaviour of make by adding ".SUFFIXES:" and the implicit compile command g++ -O -pthread -g -I. -I/home/myhome/ia-k_L/src/global/include -I/home/myhome/ia-k_L/src/gias/include Datagrid.cc /home/myhome/ia-k_L/src/gias/obj/Datagrid.o -o Datagrid