Is this a bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
infrastructure mailing list
infrastructure@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/infrastructure

[Index of Archives]     [Fedora Development]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]

  Powered by Linux