I am getting the error
C:/msys
64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\204035~1\AppData\Local\Temp\ccfgNT9U.o:wave_capture.c: (.text$_ZN5boost4asio6detail17winsock_init_base7startupERNS2_4dataEhh [_ZN5boost4asio6detail17winsock_init_base7startupERNS2_4dataEhh]+0x74): undefined reference to `__imp_WSAStartup'
Along with
undefined reference to __imp_WSACleanup'
undefined reference to __imp_WSASetLastError'
undefined reference to __imp_WSAGetLastError'
undefined reference to __imp_WSAStringToAddressA'
And one other related to a .h, .lib, and .dll located in the same folder as the .cpp file.
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/12.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\204035~1\AppData\Local\Temp\ccfgNT9U.o:wave_capture.c:(.text+0x33b): undefined reference to `TmcInitialize'
Am I missing something in tasks or other files?
tasks.json
{
"tasks": [
{
"type": "cppbuild",
"label": "C/C++: g++.exe build active file",
"command": "C:\\msys64\\mingw64\\bin\\g++.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\\msys64\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Task generated by Debugger."
},
{
"type": "cppbuild",
"label": "C/C++: gcc.exe build active file",
"command": "C:\\msys64\\mingw64\\bin\\gcc.exe",
"args": [
"-fdiagnostics-color=always",
"-g",
"${file}",
"-o",
"${fileDirname}\\${fileBasenameNoExtension}.exe"
],
"options": {
"cwd": "C:\\msys64\\mingw64\\bin"
},
"problemMatcher": [
"$gcc"
],
"group": "build",
"detail": "Task generated by Debugger."
}
],
"version": "2.0.0"
}
I have also tried with mixed luck
"command": "C:\\msys64\\mingw64\\bin\\g++.exe -lprocess -laddress -ltmctl64 -lrt",
Using Mysys, I should not have to edit my tasks and configuration json files to include boost and tmctl, according to a comment made in this thread.
note: I have read many 'undefined reference' threads here and tried a few changes, but without luck.