Home » U++ TheIDE » U++ TheIDE: Compiling, Linking, Debugging of your packages » GCC Linking Issue
GCC Linking Issue [message #34375] |
Sat, 19 November 2011 12:13 |
dentist
Messages: 2 Registered: November 2011
|
Junior Member |
|
|
Hi all!
Soon i tried to build a boost::test example in MinGW32, which required a -lboost_unit_test_framework-mgw46-mt-1_47 link option.
I tried setting it in Build methods - Release link options, but had no luck. Having in mind a GCC "bugfeature" - symbols from object files are being resolved using only libs, passed after this file, i found these lines:
uppsrc/ide/Builders/GccBuilder.cpp - GccBuilder::Link().
// lnk << " -Wl,--gc-sections,-O,2 ";
if (!HasFlag("OSX11"))
lnk << " -Wl,-O,2 "; // CXL 05/11/14 --gc-sections causing trouble on ubuntu
lnk << linkoptions;
here linkoptions variable contains my link options.
I advice you to move "lnk << linkoptions;" before "PutConsole("Linking...");", with adding a space in preceding string " -Wl,--end-group ".
It worked for me.
|
|
|
|
|
Goto Forum:
Current Time: Thu Mar 28 23:10:16 CET 2024
Total time taken to generate the page: 0.01051 seconds
|