Command line compile include libraries

This is a discussion on Command line compile include libraries within the C++ Programming forums, part of the General Programming Boards category; Hi, How to specify the library path to the compiler instead of including them one by one, i have a ...

  1. #1
    Registered User
    Join Date
    Dec 2007
    Posts
    760

    Command line compile include libraries

    Hi,

    How to specify the library path to the compiler instead of including them one by one, i have a lot of them.

    This is including them one by one:
    cl.exe myprogram.cpp "pathtolib"\user32.lib "pathtolib"\advapi32.lib

    Is there a way to just specify the lib folder?

    I know that if i use the MSVC command line i dont need to include them but i want to pass by a batch file and there is no way to call the
    MSVC cli by cmd.
    Compiler MSVC++ 2010 with Code::Blocks.

  2. #2
    Registered User hk_mp5kpdw's Avatar
    Join Date
    Jan 2002
    Location
    Northern Virginia/Washington DC Metropolitan Area
    Posts
    3,794
    Search your compiler's documentation for command line arguments... perhaps the /LIBPATH option?
    "Owners of dogs will have noticed that, if you provide them with food and water and shelter and affection, they will think you are god. Whereas owners of cats are compelled to realize that, if you provide them with food and water and shelter and affection, they draw the conclusion that they are gods."
    -Christopher Hitchens

  3. #3
    Registered User
    Join Date
    Dec 2007
    Posts
    760
    Thanks I already searched but couldnt find.

    /LIBPATH is a 2005 option not working with MSVC 2010.
    Compiler MSVC++ 2010 with Code::Blocks.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How to configure MSVC# for command line compile?
    By thetinman in forum C# Programming
    Replies: 2
    Last Post: 12-02-2008, 10:11 AM
  2. how to compile on the command line
    By majoub in forum C Programming
    Replies: 2
    Last Post: 04-23-2005, 07:40 AM
  3. What libnet libraries to include with compile?
    By failure_to in forum C Programming
    Replies: 3
    Last Post: 06-16-2004, 06:42 AM
  4. Borland Compiler: Compiling libraries from the command line
    By WHurricane16 in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 04-03-2002, 09:11 AM
  5. Replies: 4
    Last Post: 11-14-2001, 09:28 AM

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