Including -lm as default for compilling in ajunta

This is a discussion on Including -lm as default for compilling in ajunta within the C Programming forums, part of the General Programming Boards category; I use ajunta as an IDE,in order not to have to manually type the commands in the terminal to compile ...

  1. #1
    Registered User
    Join Date
    Apr 2008
    Posts
    2

    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.

    Thanks.
    GuilhermeBrant

  2. #2
    Registered User
    Join Date
    Nov 2004
    Location
    India
    Posts
    515
    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.
    Code:
    >+++++++++[<++++++++>-]<.>+++++++[<++++>-]<+.+++++++..+++.[-]>++++++++[<++++>-] <.>+++++++++++[<++++++++>-]<-.--------.+++.------.--------.[-]>++++++++[<++++>- ]<+.[-]++++++++++.

  3. #3
    Registered User
    Join Date
    Apr 2008
    Posts
    2
    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, 04:02 AM
  3. get keyboard and mouse events
    By ratte in forum Linux Programming
    Replies: 10
    Last Post: 11-17-2007, 04: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, 08:42 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21