Code::Blocks Forums

User forums => Help => Topic started by: kartari on August 29, 2010, 11:33:20 pm

Title: Auto-Importing Warning?
Post by: kartari on August 29, 2010, 11:33:20 pm
I keep getting this warning in my build logs every time I build an executable file:

||warning: auto-importing has been activated without --enable-auto-import specified on the command line.|
||Info: resolving libCommon::error      by linking to __imp___ZN9libCommon5errorE |
||=== Build finished: 0 errors, 1 warnings ===|

I've checked Project > Build Options and Project > Properties and found nothing related to auto-importing.  I do not even see where the command line parameters are located.  How can I activate auto-importing to get this warning to disappear?  I'm not sure why it's telling me about resolving libCommon::error (libCommon is my own common code library), but it's working fine.  Just don't need to see this strange warning all the time.  Thank you.
Title: Re: Auto-Importing Warning?
Post by: seb_seb0 on August 30, 2010, 07:43:24 am
Hello,

the following steps will add the "--enable-auto-import" options for a specific CodeBlocks project:
  1 - Open your project in CodeBlocks.
  2 -Open the menu "Project" -> "Build Options"
  3 -Go in tab "Linker Settings"
  4 -In the text box "Other Link Options", type "--enable-auto-import"

For adding this option as default to ALL project, follow these steps:
  1 - go to menu "Settings" -> "Compiler and Debugger..."
  2 - select your compiler (GNU GCC Compiler)
  3 -Go in tab "Linker Settings"
  4 -In the text box "Other Link Options", type "--enable-auto-import"
Title: Re: Auto-Importing Warning?
Post by: MortenMacFly on August 30, 2010, 08:14:02 am
 4 -In the text box "Other Link Options", type "--enable-auto-import"
It should read:
-Wl,--enable-auto-import
...to pass it to the linker btw...
Title: Re: Auto-Importing Warning?
Post by: kartari on August 30, 2010, 08:22:14 am
Much thanks to both of you.  I was about to post that it didn't work, but MMF's slight change did the trick.