# My step by step guides for SDL3 to build for Android and WebAssembly

**URL:** <https://discourse.libsdl.org/t/my-step-by-step-guides-for-sdl3-to-build-for-android-and-webassembly/50766>\
**Category:** SDL Development\
**Created:** [April 30, 2024, 11:39am UTC](https://discourse.libsdl.org/t/my-step-by-step-guides-for-sdl3-to-build-for-android-and-webassembly/50766 "2024-04-30T11:39:33Z")\
**Posts on this page:** 1\
**Showing post:** 25

<div class="post-metadata">

**Author:** ![8Observer8](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/8/bbe5ce/32.png) [@8Observer8](https://discourse.libsdl.org/u/8Observer8)\
**Post date:** [July 3, 2024, 2:33pm UTC](https://discourse.libsdl.org/t/my-step-by-step-guides-for-sdl3-to-build-for-android-and-webassembly/50766/25 "2024-07-03T14:33:35Z")

</div>

**GLM in the browser**

[GLM](https://github.com/g-truc/glm) is a header only library for linear algebra. You can copy source code of this library to your project directory (where main.cpp is placed). Copy and paste the `glm` folder.

```cpp
#define GLM_FORCE_PURE
#include "glm/glm.hpp"

```

```cpp
// First vector
glm::vec3 v1 = glm::vec3(1.f, 2.f, 3.f);
std::cout << "v1 = (" << v1.x << ", " << v1.y << ", " << v1.z << ")" << std::endl;
// Second vector
glm::vec3 v2 = glm::vec3(5.f, 6.f, 7.f);
std::cout << "v2 = (" << v2.x << ", " << v2.y << ", " << v2.z << ")" << std::endl;
// Sum of the vectors
glm::vec3 result = v1 + v2;
float x = result.x;
float y = result.y;
float z = result.z;
std::cout << "v1 + v2 = (" << x << ", " << y << ", " << z << ")" << std::endl;

```

Output:

```auto
v1 = (1, 2, 3)
v2 = (5, 6, 7)
v1 + v2 = (6, 8, 10)

```

---

_[View the full topic](https://discourse.libsdl.org/t/my-step-by-step-guides-for-sdl3-to-build-for-android-and-webassembly/50766)._
