CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    5

    how to replace "response file" in Linker?

    I have a question regarding linking C code.

    I am using a software package which comes with a BAT file
    for compile and link my code and the libraries in the package.
    I have no problem to use this batch file and I can get my *.exe
    file easily. However, this Batch file uses a *.LST file which
    consists of over 20 lines of libraries names and some linker options.

    The link command line in the batch file looks like this

    %COMPPATH%\bin\link %1.obj @fxlib.LST

    fxlib.LST is the "response file" with a lot of path name (library names).

    Now, I want to use MSVisual C++ to compile and build my
    code. I always fail to let the Linker to find the lirbaries. I set
    the path but it seems not working.

    Since this linker option is not available from the Visual Studio development environment, I like to know if anyone can help
    to find an easy way to include a lot of library files either in a file
    or put them in the right place inside Visual C++ IDE
    (visual studio).

    Thank you very much!!!

  2. #2
    Join Date
    Jun 2002
    Location
    Letchworth, UK
    Posts
    1,020
    If you wish to use the VC++ IDE, go to Tools/Options/Directories. Under Show Directories For, click on libraries. Add your library path there. That is the easy bit: it will work forever until you remove it.

    The difficult bit is when you change the project settings. Stick all the library names in a notepad file, separating them with spaces: not linefeeds. Got to Settings.../Link/Category Input. Copy the library names from your notepad file and paste it in the object library modules. This has to be done for every new project so keep your notepad file handy.

    I had to do this for MKS Nutcracker and I have yet to find more elegant solution.
    Succinct is verbose for terse

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured