Linking problems when passing linker flags before files

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

 



Hello,

when I compile my program like this `g++ -std=c++17 -lstdc++fs test.cpp -o
test` it fails to compile because of linker errors. The reasons is that
`test.cpp` should some before `-lstdc++fs`.
This is a serious problem because it's very hard to debug it.
I'm wondering, why is this required to have files before linker flags and
if I should report this as a bug.

Jakub



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux