undefined reference to `glm_ivec2_div' when building in wsl
Rbel12b opened this issue · comments
I use wsl in vS Code
When I run make libs
it displays no errors.
But when I run make game
it says:
gcc -o bin/game src/block/air.o src/block/block.o src/block/buttercup.o src/block/clay.o src/block/coal.o src/block/cobblestone.o src/block/copper.o src/block/dirt.o src/block/glass.o src/block/grass.o src/block/gravel.o src/block/lava.o src/block/leaves.o src/block/log.o src/block/pineleaves.o src/block/pinelog.o src/block/planks.o src/block/podzol.o src/block/rose.o src/block/sand.o src/block/shrub.o src/block/snow.o src/block/stone.o src/block/tallgrass.o src/block/torch.o src/block/water.o src/entity/c_blocklook.o src/entity/c_camera.o src/entity/c_control.o src/entity/c_debug.o src/entity/c_light.o src/entity/c_movement.o src/entity/c_physics.o src/entity/c_position.o src/entity/ecs.o src/entity/player.o src/gfx/blockatlas.o src/gfx/renderer.o src/gfx/shader.o src/gfx/texture.o src/gfx/vao.o src/gfx/vbo.o src/gfx/window.o src/ui/crosshair.o src/ui/hotbar.o src/ui/ui.o src/util/camera.o src/util/color.o src/util/direction.o src/util/fmath.o src/world/blockmesh.o src/world/chunk.o src/world/chunkmesh.o src/world/light.o src/world/sky.o src/world/world.o src/main.o src/world/gen/flowergen.o src/world/gen/grassgen.o src/world/gen/noise.o src/world/gen/shrubgen.o src/world/gen/treegen.o src/world/gen/worldgen.o lib/glad/src/glad.o lib/noise/libnoise.a -lm -lcglm -lglfw -lGL -lGLX -lOpenGL -lGLU -ldl -lpthread
/usr/bin/ld: src/entity/c_blocklook.o: in functionglms_ivec3_mod': /home/abel/minecraft-weekend-1/src/entity/../util/ivec3s.h:326:(.text+0x4f8): undefined reference to
glm_ivec3_mod'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/entity/../util/ivec3s.h:326:(.text+0x54d): undefined reference toglm_ivec3_mod' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/entity/../util/ivec3s.h:326:(.text+0x816): undefined reference to
glm_ivec3_mod'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/entity/../util/ivec3s.h:326:(.text+0x865): undefined reference toglm_ivec3_mod' /usr/bin/ld: src/entity/c_control.o: in function
glms_ivec3_mod':
/home/abel/minecraft-weekend-1/src/entity/../util/ivec3s.h:326:(.text+0x5f6): undefined reference toglm_ivec3_mod' /usr/bin/ld: src/entity/c_control.o:/home/abel/minecraft-weekend-1/src/entity/../util/ivec3s.h:326: more undefined references to
glm_ivec3_mod' follow
/usr/bin/ld: src/world/world.o: in functionglms_ivec3_norm2': /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:201:(.text+0x37): undefined reference to
glm_ivec3_norm2'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:201:(.text+0x62): undefined reference toglm_ivec3_norm2' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:201:(.text+0xb7): undefined reference to
glm_ivec3_norm2'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:201:(.text+0xe2): undefined reference toglm_ivec3_norm2' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:201:(.text+0x134): undefined reference to
glm_ivec3_norm2'
/usr/bin/ld: src/world/world.o:/home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:201: more undefined references toglm_ivec3_norm2' follow /usr/bin/ld: src/world/world.o: in function
glms_ivec2_mod':
/home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec2s.h:298:(.text+0x30f): undefined reference toglm_ivec2_mod' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec2s.h:298:(.text+0x33d): undefined reference to
glm_ivec2_mod'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec2s.h:298:(.text+0x485): undefined reference toglm_ivec2_mod' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec2s.h:298:(.text+0x4b3): undefined reference to
glm_ivec2_mod'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec2s.h:298:(.text+0x60e): undefined reference toglm_ivec2_mod' /usr/bin/ld: src/world/world.o:/home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec2s.h:298: more undefined references to
glm_ivec2_mod' follow
/usr/bin/ld: src/world/world.o: in functionglms_ivec3_mod': /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:326:(.text+0x9da): undefined reference to
glm_ivec3_mod'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:326:(.text+0xa29): undefined reference toglm_ivec3_mod' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:326:(.text+0xdd7): undefined reference to
glm_ivec3_mod'
/usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:326:(.text+0xe34): undefined reference toglm_ivec3_mod' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:326:(.text+0x2662): undefined reference to
glm_ivec3_mod'
/usr/bin/ld: src/world/world.o:/home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:326: more undefined references toglm_ivec3_mod' follow /usr/bin/ld: src/gfx/blockatlas.o: in function
glms_ivec2_div':
/home/abel/minecraft-weekend-1/src/gfx/../util/ivec2s.h:282:(.text+0xde): undefined reference toglm_ivec2_div' /usr/bin/ld: src/gfx/texture.o: in function
glms_ivec2_div':
/home/abel/minecraft-weekend-1/src/gfx/../util/ivec2s.h:282:(.text+0x20716): undefined reference toglm_ivec2_div' /usr/bin/ld: /home/abel/minecraft-weekend-1/src/gfx/../util/ivec2s.h:282:(.text+0x20839): undefined reference to
glm_ivec2_div'
/usr/bin/ld: src/world/chunk.o: in functionglms_ivec3_norm': /home/abel/minecraft-weekend-1/src/world/../gfx/../util/ivec3s.h:214:(.text+0xa48): undefined reference to
glm_ivec3_norm'
collect2: error: ld returned 1 exit status
make: *** [Makefile:41: game] Error 1