Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cbb4e54

Browse files
committed
Add missing LDFLAGS
1 parent a2104ea commit cbb4e54

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

en/02_Development_environment.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -323,10 +323,10 @@ We're going to use modern C++ (`-std=c++17`), and we'll set optimization level t
323323
Similarly, define the linker flags in a `LDFLAGS` variable:
324324

325325
```make
326-
LDFLAGS = -lglfw -lvulkan -ldl -lpthread
326+
LDFLAGS = -lglfw -lvulkan -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi
327327
```
328328

329-
The flag `-lglfw` is for GLFW, `-lvulkan` links with the Vulkan function loader and the remaining flags are low-level system libraries that GLFW needs.
329+
The flag `-lglfw` is for GLFW, `-lvulkan` links with the Vulkan function loader and the remaining flags are low-level system libraries that GLFW needs. The remaining flags are dependencies of GLFW itself: the threading and window management.
330330

331331
Specifying the rule to compile `VulkanTest` is straightforward now. Make sure to
332332
use tabs for indentation instead of spaces.
@@ -357,7 +357,7 @@ Running `make test` should show the program running successfully, and displaying
357357

358358
```make
359359
CFLAGS = -std=c++17 -O2
360-
LDFLAGS = -lglfw -lvulkan -ldl -lpthread
360+
LDFLAGS = -lglfw -lvulkan -ldl -lpthread -lX11 -lXxf86vm -lXrandr -lXi
361361

362362
VulkanTest: main.cpp
363363
g++ $(CFLAGS) -o VulkanTest main.cpp $(LDFLAGS)

0 commit comments

Comments
 (0)