差分
このページの2つのバージョン間の差分を表示します。
| 両方とも前のリビジョン前のリビジョン | |
| softwares:root:app [2016/11/27 09:41] – [Makefile メモ] kobayash | softwares:root:app [2018/01/27 15:32] (現在) – kobayash |
|---|
| * リンク | * リンク |
| * Makefile の書き方 (C 言語) — WTOPIA v1.0 documentation http://www.ie.u-ryukyu.ac.jp/~e085739/c.makefile.tuts.html | * Makefile の書き方 (C 言語) — WTOPIA v1.0 documentation http://www.ie.u-ryukyu.ac.jp/~e085739/c.makefile.tuts.html |
| | |
| | ==== デバッグメモ ==== |
| | === include ファイルと lib ファイルのバージョンが違う場合 === |
| | * Include する root のバージョンが違うと、以下のようなメッセージが出た。<code> [koba@kr h2root_smp_on_kr]$ ./h2root |
| | center -600.000000 |
| | Error in <TUnixSystem::DynamicPathName>: FFTW[.so | .dll | .dylib | .sl | .dl | .a] does not exist in /home/koba/cern/root_v5.34.36/lib/root:/home/koba/cern/root_v5.32.04/lib/root:/root:/home/koba/cern/root_v5.32.04/lib/root:/home/koba/cern/anaroot_v4.5.15/anaroot/lib:/home/koba/cern/anaroot_v4.5.15/anaroot/lib:.:/home/koba/cern/root_v5.34.36/lib/root::/home/koba/cern/root_v5.34.36/lib/root/cint/cint/stl |
| | Error in <TVirtualFFT::FFT>: handler not found |
| | *** glibc detected *** ./h2root: corrupted double-linked list: 0x000000000275a570 *** |
| | ======= Backtrace: ========= |
| | /lib64/libc.so.6[0x33ef075dee] |
| | /lib64/libc.so.6[0x33ef078ff6] |
| | /lib64/libc.so.6(exit+0x115)[0x33ef0359c5] |
| | /lib64/libc.so.6(__libc_start_main+0x104)[0x33ef01ed24] |
| | ./h2root[0x400889] |
| | ======= Memory map: ======== |
| | 00400000-00401000 r-xp 00000000 fd:02 6838699 /home/koba/Dropbox/works/root/h2root_smp_on_kr/h2root |
| | </code> |
| | * h2root.cc <code> |
| | #include <stdio.h> |
| | #include "TH1.h" |
| | int main(int argc, char **argv) |
| | { |
| | TH1F *h1; |
| | h1 = new TH1F("aa","aa",1200,-600.,600.); |
| | printf("center %f\n",h1->GetBinCenter(10)); |
| | h1->Fill(1.0,1.0); |
| | return 0; |
| | } |
| | </code> |
| | * Makefile <code>TARGETS = h2root |
| | ROOTCFLAGS = -O2 -pipe -m64 -Wshadow -Wall -W -Woverloaded-virtual -fPIC -I/home/koba/cern/root_v5.32.04/root/include -DR__HAVE_CONFIG -pthread |
| | ROOTLFLAGS = -m64 -O2 -Wl,--no-undefined -Wl,--as-needed |
| | ROOTLIBS = -L/home/koba/cern/root_v5.34.36/lib/root -lCore -lCint -lRIO -lNet -lHist -lGraf -lGraf3d -lGpad -lTree -lRint -lPostscript -lMatrix -lPhysics -lMathCore -lThread -pthread -lm -ldl -rdynamic /home/koba/cern/root_v5.34.36/lib/root/libminicern.so /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgfortran.so /usr/lib/gcc/x86_64-redhat-linux/4.4.7/libgfortranbegin.a |
| | |
| | all: $(TARGETS) |
| | h2root: h2root.o |
| | g++ $(ROOTLFLAGS) -o $@ $< $(ROOTLIBS) |
| | .cc.o: |
| | g++ $(ROOTCFLAGS) -c $< |
| | .PHONY : clean |
| | clean: |
| | rm -rf *.o |
| | </code> |
| | |