Is this a bug?

Ashoordin a.ashoormaram at gmail.com
Sat Jan 17 03:12:15 UTC 2015


Hello friends,
I am new with Fedora 21 but I am trying to learn C++ as well. So, in my
compilation command of
"g++ -Wall `root-config --cflags --ldflags --libs` example.cpp" I am
receiving the error message
"/usr/lib/gcc/i686-redhat-linux/4.9.2/../../../crt1.o: In function `_start':
(.text+0x18): undefined reference to `main'
collect2: error: ld returned 1 exit status"
After changing the compilation command to
"g++ -ansi -Wall -I /usr/include -c example.cpp"
I no longer receive the error.
However during linking command
"g++ -L /usr/lib/../../../ crt1.o *.o -lgsl -lgslcblas -lm"
I receive the following error message
"g++: error: crt1.o: No such file or directory"
But, I know for sure that there is such a file. So, what could be wrong?

Thanks for everyone's help,
Ashur
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/infrastructure/attachments/20150116/d4c37854/attachment.html>


More information about the infrastructure mailing list