flatbuffers icon indicating copy to clipboard operation
flatbuffers copied to clipboard

Output path option does not work on Windows [C++, flatc.exe all versions, win 10]

Open jsyqrt opened this issue 2 years ago • 1 comments

When using flatc.exe downloaded from github release page to compile my schema file on windows 10, in a cmd environment, I found that the "-o" option doesn't work.

i.e. when I was in C:\User\Test\Desktop, and execute C:\Users\Test\Downloads\flatc.exe --cpp --gen-mutable --gen-object-api --keep-prefix -o "C:\Users\Test\Desktop\test\" "C:\Users\Test\Downloads\test.fbs"

It generates test_generated.h to C:\User\Test\Desktop\, which is not expected, and should be C:\Users\Test\Desktop\test\ instead.

-o works normally on other platforms, like linux, mac os.

jsyqrt avatar Jun 08 '22 03:06 jsyqrt

I just tested this on my Windows machine at head

C:\Users\Derek\Desktop\flatbuffers> .\flatc.exe --cpp -o "C:\Users\Derek\Desktop\test" .\samples\monster.fbs

And it generated in the correct location:

PS C:\Users\Derek\Desktop\flatbuffers> ls ..\test


    Directory: C:\Users\Derek\Desktop\test


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
-a----         6/14/2022   4:20 PM          14053 monster_generated.h

dbaileychess avatar Jun 14 '22 23:06 dbaileychess

This issue is stale because it has been open 6 months with no activity. Please comment or label not-stale, or this will be closed in 14 days.

github-actions[bot] avatar Mar 04 '23 01:03 github-actions[bot]

This issue was automatically closed due to no activity for 6 months plus the 14 day notice period.

github-actions[bot] avatar Mar 18 '23 20:03 github-actions[bot]