Author Topic: run with sudo from code::blocks  (Read 3451 times)

Offline fbt

  • Single posting newcomer
  • *
  • Posts: 2
run with sudo from code::blocks
« on: January 29, 2016, 02:37:22 pm »
Hi!, i would like to run a compiled program from code::blocks  (ubuntu) but adding "sudo LD_LIBRARY_PATH=..." before the executable. it is possible avoiding to do it from a terminal, or invoking code::block with sudo command?. any help will be appreciated. thanks

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: run with sudo from code::blocks
« Reply #1 on: January 29, 2016, 03:09:10 pm »
Hi!, i would like to run a compiled program from code::blocks  (ubuntu) but adding "sudo LD_LIBRARY_PATH=..." before the executable. it is possible avoiding to do it from a terminal, or invoking code::block with sudo command?. any help will be appreciated. thanks
You could do a "command only" target and use macros to achieve that.
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 fbt

  • Single posting newcomer
  • *
  • Posts: 2
Re: run with sudo from code::blocks
« Reply #2 on: February 01, 2016, 10:11:10 am »
Hi, thanks for your answer ... since i'm not at expert at all, could you please give any link or additional info in order to fulfull your proposal? thanks