2016-03-06 57 views
-1

所以,我做了一件愚蠢的,並給自己買了一個鏈接錯誤:在連接錯誤「的插件符號」

CMakeFiles/pipeline.dir/src/pipeline/pipelineElements/tracker/ObjectTracker.cpp.o (symbol from plugin): In function `ObjectTracker::process(long)': 
(.text+0x0): multiple definition of `BackgroundSubtract::OptionTypes<(BackgroundSubtractOptionID)0>::type PipelineConfiguration::getOption<BackgroundSubtract, (BackgroundSubtractOptionID)0>(BackgroundSubtract const&) const' 
CMakeFiles/pipeline.dir/src/pipeline/pipelineElements/RegionFinder.cpp.o (symbol from plugin):(.text+0x0): first defined here 
CMakeFiles/pipeline.dir/src/pipeline/pipelineElements/tracker/ObjectTracker.cpp.o (symbol from plugin): In function `ObjectTracker::process(long)': 

我很好奇「從插件符號」的部分是什麼意思?我從來沒有見過,在我的各種冒險鏈接器錯誤之前。在這種情況下什麼是「插件」?

回答

1

這是指提高優化質量的鏈接器插件;大概這個版本是使用國旗-fuse-linker-plugin

When supported by the linker, the linker plugin (see -fuse-linker-plugin) passes information to the compiler about used and externally visible symbols.

[...]

This information specifies what symbols can be accessed externally (by non-LTO object or during dynamic linking).

http://gcc.gnu.org/onlinedocs/gcc-4.6.4/gcc/Optimize-Options.html