Skip to content

Commit f1f95bc

Browse files
committed
address PR comments
1 parent f68b0b6 commit f1f95bc

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

examples/cpp/CMakeLists.txt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
11
add_subdirectory(clock)
22
add_subdirectory(custom_collection_adapter)
33
add_subdirectory(dna)
4-
add_subdirectory(shared_recording)
54
add_subdirectory(minimal)
5+
add_subdirectory(shared_recording)
66
add_subdirectory(spawn_viewer)
7+
add_subdirectory(stdio)
78

89
add_custom_target(examples)
910

1011
add_dependencies(examples example_clock)
1112
add_dependencies(examples example_custom_collection_adapter)
1213
add_dependencies(examples example_dna)
13-
add_dependencies(examples example_shared_recording)
1414
add_dependencies(examples example_minimal)
15+
add_dependencies(examples example_shared_recording)
1516
add_dependencies(examples example_spawn_viewer)
17+
add_dependencies(examples example_stdio)

examples/cpp/stdio/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ Demonstrates how to log data to standard output with the Rerun SDK, and then vis
1818

1919
To build it from a checkout of the repository (requires a Rust toolchain):
2020
```bash
21-
just cpp-build-examples
22-
echo 'hello from stdin!' | ./build/debug/examples/cpp/stdio/example_stdio | rerun -
21+
cmake .
22+
cmake --build . --target example_stdio
23+
echo 'hello from stdin!' | ./examples/cpp/stdio/example_stdio | rerun -
2324
```

rerun_cpp/src/rerun/error.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ namespace rerun {
4545
_CategoryRecordingStream = 0x0000'0100,
4646
RecordingStreamCreationFailure,
4747
RecordingStreamSaveFailure,
48+
RecordingStreamStdoutFailure,
4849
RecordingStreamSpawnFailure,
4950

5051
// Arrow data processing errors.

rerun_cpp/src/rerun/recording_stream.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,10 @@ namespace rerun {
182182
/// default back to `buffered` mode, in order not to break the user's terminal.
183183
///
184184
/// This function returns immediately.
185+
//
186+
// NOTE: This should be called `stdout` like in other SDK, but turns out that `stdout` is a
187+
// macro when compiling with msvc [1].
188+
// [1]: https://learn.microsoft.com/en-us/cpp/c-runtime-library/stdin-stdout-stderr?view=msvc-170
185189
Error to_stdout() const;
186190

187191
/// Initiates a flush the batching pipeline and waits for it to propagate.

0 commit comments

Comments
 (0)