-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Description
I am exploring MLX-C for fun. I have already built the library and used make install to install the headers and libraries. They got installed at the path /usr/local/include/ and /usr/local/lib/. As a test program, I wrote the following:
#include<stdio.h>
#include "mlx/c/mlx.h"
int main(){
printf("GPU information\n");
printf("---------------");
mlx_metal_device_info_t info = mlx_metal_device_info();
printf("Architecture:\t%s\n", info.architecture);
printf("Maximum buffer length:\t%ld\n", info.max_buffer_length);
printf(
"Max recommended working set size:\t%ld\n",
info.max_recommended_working_set_size);
printf("Memory size:\t%ld\n", info.memory_size);
return 0;
}With the build command below, I get errors:
clang -I/usr/local/include -L/usr/local/lib test.c -o test
Undefined symbols for architecture arm64:
"_mlx_metal_device_info", referenced from:
_main in test-7c0886.o
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)What is the correct way to build?
Metadata
Metadata
Assignees
Labels
No labels