none
cl.exe: how to setup path for objects dir (/Fo), which contains spaces?

    Question

  • Hello, Everyone,

    I use cl.exe MSVC compiler from command line. What I would like to do is:

    • Only compile sources to objects files (/c)
    • Pass multiple source files to the compiler
    • Tell the compiler, where is should put output object files: /Fopath\to\output\dir\

    The question is: is it possible to use "path\to\output\dir", which contains spaces? (I tried to include only path in quotes or path together with /Fo option, but did not succeed).

    Thanks.


    Dmitry Semikin


    P.S.: If this is important I use MSVS 9 (2008)
    3 hours 4 minutes ago

All Replies

  • /Fo "path in quotes"

    should work. Make sure to remove the trailing backslash from the path, or leave a space between it and the closing quotes: the shell interprets \" as an escape sequence.


    Igor Tandetnik

    2 hours 8 minutes ago