Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to next message
dentist is currently offline  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.
Re: GCC Linking Issue [message #34384 is a reply to message #34375] Sat, 19 November 2011 19:17 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
dentist wrote on Sat, 19 November 2011 06:13

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.


You are rather excpected to add it to in package organizer as Library (it has logic: packages are portable across machines, so information about required libraries should be stored with them. Build method contains information about particular machine).

Look how other ld libraries are quoted there...

Mirek
Re: GCC Linking Issue [message #34410 is a reply to message #34375] Mon, 21 November 2011 05:45 Go to previous message
dentist is currently offline  dentist
Messages: 2
Registered: November 2011
Junior Member
It helped, thank you! Was not familiar with these settings.
Previous Topic: compilation error on ubuntu 11.04 (glibconfig.h)
Next Topic: [Debugging] Watch global variables
Goto Forum:
  


Current Time: Thu Mar 28 23:10:16 CET 2024

Total time taken to generate the page: 0.01051 seconds