Microsoft Developer Network > Forenhomepage > Visual C# IDE > invalid search path for library
Stellen Sie eine FrageStellen Sie eine Frage
 

Frageinvalid search path for library

  • Sonntag, 4. März 2007 15:02dmonney TeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     

    I just uninstalled visual studio 6.0 and installed 2005.

    Now when I compile I get this error

    warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual
            Studio\VC98\mfc\lib' specified in 'LIB environment variable' -- 'The
            system cannot find the path specified. '
    warning CS1668: Invalid search path 'C:\Program Files\Microsoft Visual
            Studio\VC98\lib' specified in 'LIB environment variable' -- 'The system
            cannot find the path specified. '
    first.cs(9,53): error CS1002: ; expected

    I read in another thread to see what happens when you type "set lib"...this is what comes up.

    c:\Program Files\Microsoft Visual Studio 8\VC>set lib
    lib=c:\Program Files\Microsoft Visual Studio 8\VC\ATLMFC\LIB;c:\Program Files\Mi
    crosoft Visual Studio 8\VC\LIB;c:\Program Files\Microsoft Visual Studio 8\VC\Pla
    tformSDK\lib;c:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\lib;C:\Program
    Files\Microsoft Visual Studio\VC98\mfc\lib;C:\Program Files\Microsoft Visual Stu
    dio\VC98\lib
    LIBPATH=c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;c:\Program Files\Microsoft
     Visual Studio 8\VC\ATLMFC\LIB

    Thanks a bunch

Alle Antworten

  • Montag, 5. März 2007 02:57TaylorMichaelLMVP, ModeratorTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillenTeilnehmermedaillen
     

    Edit your LIB variable in Control Panel\System.  Remove the entries for c:\Program Files\Microsoft VIsual Studio\... as these are the VS6 paths.  If you never build from the command line then you can also change the values used by VS from within VS itself in the Tools\Options\C++ settings.  Within there is the paths that the VC++ compiler will use.  However C# uses the LIB path as well so it is best to change the environment variable.

    Michael Taylor - 3/4/07
    http://p3net.mvps.org