You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
VS2022 ::: Severity Code Description Project File Line Suppression State Details
Error LNK2001 unresolved external symbol stbir_resize_uint8 RysuneBotGUI C:\Users\User\Desktop\Quansen\RysuneBotGUI\main.obj 1
Line of Code:
int desired_width = 720;
int desired_height = 720;
void* resized_image_data_ptr = malloc(desired_width * desired_height * 4);
if (!resized_image_data_ptr) {
std::cerr << "Failed to allocate memory" << std::endl;
stbi_image_free(image_data);
return -1;
}
unsigned char* resized_image_data = static_cast<unsigned char*>(resized_image_data_ptr);
stbir_resize_uint8(image_data, width, height, 0, resized_image_data, desired_width, desired_height, 0, 4); //
The line where the error is found (It gets fixed when removed)
The text was updated successfully, but these errors were encountered:
COMPILING & LINKING
In one C/C++ file that #includes this file, do this:
#define STB_IMAGE_RESIZE_IMPLEMENTATION
before the #include. That will create the implementation in that file.
VS2022 ::: Severity Code Description Project File Line Suppression State Details
Error LNK2001 unresolved external symbol stbir_resize_uint8 RysuneBotGUI C:\Users\User\Desktop\Quansen\RysuneBotGUI\main.obj 1
Line of Code:
int desired_width = 720;
int desired_height = 720;
void* resized_image_data_ptr = malloc(desired_width * desired_height * 4);
if (!resized_image_data_ptr) {
std::cerr << "Failed to allocate memory" << std::endl;
stbi_image_free(image_data);
return -1;
}
unsigned char* resized_image_data = static_cast<unsigned char*>(resized_image_data_ptr);
stbir_resize_uint8(image_data, width, height, 0, resized_image_data, desired_width, desired_height, 0, 4); //
The line where the error is found (It gets fixed when removed)
The text was updated successfully, but these errors were encountered: