Hi there, i’m taking the C++ fundamentals course and am using a Mac (Monteray & Intel Chip) - i’ve got as far section 10 where we have to include raylib.
Raylib has been installed via brew, and i am using the vscode template from the gitlab repo.
When i try to build my code i get the following error:
Undefined symbols for architecture x86_64:
"_InitWindow", referenced from:
_main in main-884f8f.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
My c_cpp_properties file is included below:
{
"configurations": [
{
"name": "Win32",
"includePath": [
"C:/raylib/raylib/src/**",
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"GRAPHICS_API_OPENGL_33",
"PLATFORM_DESKTOP"
],
"compilerPath": "C:/raylib/w64devkit/bin/gcc.exe",
"cStandard": "c99",
"cppStandard": "c++14",
"intelliSenseMode": "gcc-x64"
},
{
"name": "Mac",
"includePath": [
"${workspaceFolder}/**",
"/usr/local/include/",
"/usr/local/Cellar/raylib/4.2.0/include"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"GRAPHICS_API_OPENGL_33",
"PLATFORM_DESKTOP"
],
"macFrameworkPath": [
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang++",
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "macos-clang-x64"
},
{
"name": "Linux",
"includePath": [
"/home/linuxbrew/.linuxbrew/include",
"${workspaceFolder}/**"
],
"defines": [
"_DEBUG",
"UNICODE",
"_UNICODE",
"GRAPHICS_API_OPENGL_33",
"PLATFORM_DESKTOP"
],
"cStandard": "c11",
"cppStandard": "c++14",
"intelliSenseMode": "gcc-x64"
}
],
"version": 4
}
Please could you provide some pointers as I am now stuck and cannot proceed with the course, which makes me sad.
Thanks