Skip to content

Commit e6d8912

Browse files
authored
Merge pull request #41712 from cabmeurer/cxx-interop/Fix-typo-update-example-cxx-module
[cxx-interop] Fix typo in getting started, and update example for creating the cxx module
2 parents 343caa5 + 9ad8798 commit e6d8912

File tree

1 file changed

+8
-9
lines changed

1 file changed

+8
-9
lines changed

docs/CppInteropability/GettingStartedWithC++Interop.md

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,23 @@ struct ContentView: View {
5959
```
6060

6161
```
62-
//In Cxx.cpp
62+
//In Cxx.hpp
63+
64+
#ifndef Cxx_hpp
65+
#define Cxx_hpp
6366
64-
#include "Cxx.hpp"
6567
int cxxFunction(int n) {
6668
return n;
6769
}
68-
70+
#endif
6971
```
7072

7173
```
72-
//In Cxx.hpp
73-
74-
#ifndef Cxx_hpp
75-
#define Cxx_hpp
74+
//In Cxx.cpp
7675
76+
#include "Cxx.hpp"
7777
int cxxFunction(int n);
7878
79-
#endif
8079
8180
```
8281

@@ -198,7 +197,7 @@ CxxInterop.main()
198197
199198
```
200199

201-
- In your projects direcetoy, run `cmake` to generate the systems build files
200+
- In your project's directory, run `cmake` to generate the systems build files
202201

203202
- To generate an Xcode project run `cmake -GXcode`
204203
- To generate with Ninja run `cmake -GNinja`

0 commit comments

Comments
 (0)