Author Topic: Auto-Importing Warning?  (Read 5277 times)

Offline kartari

  • Multiple posting newcomer
  • *
  • Posts: 10
Auto-Importing Warning?
« 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.

Offline seb_seb0

  • Almost regular
  • **
  • Posts: 166
Re: Auto-Importing Warning?
« Reply #1 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"

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: Auto-Importing Warning?
« Reply #2 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...
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline kartari

  • Multiple posting newcomer
  • *
  • Posts: 10
Re: Auto-Importing Warning?
« Reply #3 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.