Thread: Including -lm as default for compilling in ajunta

  1. #1
    Registered User
    Join Date
    Apr 2008

    Including -lm as default for compilling in ajunta

    I use ajunta as an IDE,in order not to have to manually type the commands in the terminal to compile and execute the programs,so I can do it in lss than 5 seconds just pressing F11 + F3 .

    The problem is that I noticed gcc has a problem with the math library(not the header),so when you use functions like pow(),if you don't include the -lm as an argument for compilation,it won't compile,returning "undefined reference to pow".

    How can I add -lm as a default argument for compilation in ajunta,in order to still be able to compile/run it fast?Or if someone knows any other way to make the compilation work that doesn't need to add -lm.


  2. #2
    Registered User
    Join Date
    Nov 2004
    Should be there in Tools->Compiler options or something similar. I haven't worked with ajunta, but on devcpp you can specify commandline parameters to the program and arguments to the compiler and linker by specifying them under tools->compiler options.
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Well,just figured out.In ajunta just go to Definitions > Commands ; Then in Specific Language Commands just add the arguments ( -lm, in the case) , to the Compile and/or Compile a File fields.Finally now pow works without any problem here in linux.
    Thanks PING for the advice.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Utilizing another compiled program for a task.
    By kotoroshinoto in forum C Programming
    Replies: 6
    Last Post: 06-03-2008, 01:43 PM
  2. Can we have vector of vector?
    By ketu1 in forum C++ Programming
    Replies: 24
    Last Post: 01-03-2008, 05:02 AM
  3. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 05:42 PM
  4. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  5. Including default headerfiles in custom headerfiles
    By Sentral in forum C++ Programming
    Replies: 7
    Last Post: 02-18-2006, 09:42 AM