C++

How to Build and Run C++ Samples

General Samples

  1. Under the samples directory, there are folders with the structure "Sample Name\Platform Name". Open the .sln file in each folder using Visual Studio.

  2. Specify the command arguments in Project > Properties > Debugging > Command Arguments.

    $(endPoint) $(uid) $(clientKey) e.g. 192.168.XXX.XXX:7000 2222 5599933
  3. Press F5 to build and run. The execution status will be displayed in the output window.

  4. To run multiple clients, execute them as separate processes via Windows Terminal (Command Prompt) or similar.

    > .\x64\Debug\matchmaker_ticket.exe $(endPoint) $(uid) $(clientKey)
    e.g. matchmaker_ticket.exe 192.168.XXX.XXX:7000 2222 5599933

Building Samples for iOS Simulator

  1. In Xcode, go to Product > Destination > Destination Architectures and ensure Show Rosetta Destinations is checked.

  2. Click the run destination in the top bar and select the Rosetta simulator.

  3. Open Build Settings > Search Paths.

  4. Adjust the search path order so that ../../../platforms/ios/iOS-Simulator/lib_static is prioritized.

Running Android Samples

  1. Right-click on the project in Visual Studio and open Properties.

  2. Navigate to Debugging.

  3. Set the launch arguments in Launch Flags. Specify the arguments with the --es option (intent arguments).

  4. e.g.

    --es host 192.168.55.117:7000 --es uid 1111 --es clientKey AAAA

最終更新