Author Topic: Is there a way to pass arguments to ar (static library)  (Read 4128 times)

Offline mushakk

  • Multiple posting newcomer
  • *
  • Posts: 54
Is there a way to pass arguments to ar (static library)
« on: June 18, 2013, 06:30:41 pm »
I'm wondering is there is a way to pass arguments to the "ar" command, in the same way we can pass arguments to the linker.

Thanks in advance!

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Is there a way to pass arguments to ar (static library)
« Reply #1 on: June 18, 2013, 06:56:01 pm »
No, in the project options. You have to modify the compiler's commands in the advanced settings of the compiler.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline mushakk

  • Multiple posting newcomer
  • *
  • Posts: 54
Re: Is there a way to pass arguments to ar (static library)
« Reply #2 on: June 18, 2013, 07:12:00 pm »
Then it can't be "per project"  :(

Do you know if there is some plan to do this in the future?

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9703
Re: Is there a way to pass arguments to ar (static library)
« Reply #3 on: June 18, 2013, 08:05:44 pm »
Do you know if there is some plan to do this in the future?
You should first start with providing a use-case for this. You are the first asking for this feature since C::B is alive and kicking.

As a "work-around" you could just make a copy of a compiler, adjust the settings in the copied compiler and then use this for the projects where you need specific parameters. This leaves all other projects using the "default" compiler as-is.
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