Hi Boris, On Tue, 2004-12-14 at 01:21 -0500, Boris Skorodumov wrote: > Dear Rooters, > > I am based on example guitest.C provided with root 4-00-08f version. > I was trying to compile three files which I attached to this letter with > the next command: > > g++ `root-config --cflags --glibs` -o main main.cxx MyMain.cxx > > I got the next linking error: > > /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../../crt1.o(.text+0x18): In > function `_start': > ../sysdeps/i386/elf/start.S:77: undefined reference to `main' > collect2: ld returned 1 exit status You should define `STANDALONE': g++ -DSTANDALONE `root-config --cflags --glibs` -o main main.cxx MyMain.cxx > Maybe this error not connected with root itself, it isn't. > if so, sorry for the question that should not be addressed in roottalk. I think it's OK. > plain text document attachment (main.cxx) > #include "MyMain.h" > > #ifdef STANDALONE ^^^^^^^^^^^^^^^^^ ||||||||||||||||| Because of this, the below was never seen by the compiler. > TROOT root("Ldf Test", "Ldf Test"); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ||||||||||||||||||||||||||||||||||| Not needed. > int main(int argc, char **argv) > { > TApplication theApp("App", &argc, argv); > MyMainFrame mainWin(gClient->GetRoot(), 400, 220); > theApp.Run(); > > return 0; > } > #endif Yours, -- ___ | Christian Holm Christensen |_| | ------------------------------------------------------------- | | Address: Sankt Hansgade 23, 1. th. Phone: (+45) 35 35 96 91 _| DK-2200 Copenhagen N Cell: (+45) 24 61 85 91 _| Denmark Office: (+45) 353 25 404 ____| Email: cholm@nbi.dk Web: www.nbi.dk/~cholm | |
This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:10 MET