Problems with brms package in R Studio

I ran the following model in R studio with brms:

model <- brm(bf(formula),
             data   = df_region,
             prior = bpriors,
             warmup = 1000,
             iter   = 5000,
             chains = 2,
             cores  = 4)

Operating System: Windows 10

brms Version: 2.18.0

R version: 4.2.2

it was working in my old computer but now with new computer I m getting this error below;

Compiling Stan program...
make cmd is
  make -f "C:/R-42~1.2/etc/x64/Makeconf" -f "C:/R-42~1.2/share/make/winshlib.mk" -f "C:/Users/ozgur.alptekin/OneDrive - insidemedia.net/Documents/.R/Makevars.win" CXX='$(CXX14) $(CXX14STD)' CXXFLAGS='$(CXX14FLAGS)' CXXPICFLAGS='$(CXX14PICFLAGS)' SHLIB_LDFLAGS='$(SHLIB_CXX14LDFLAGS)' SHLIB_LD='$(SHLIB_CXX14LD)' SHLIB="file47887957199b.dll" WIN=64 TCLBIN= OBJECTS="file47887957199b.o"

make would use
if test "zfile47887957199b.o" != "z"; then \
  if test -e "file47887957199b-win.def"; then \
    echo g++ -shared -s -static-libgcc -o file47887957199b.dll file47887957199b-win.def file47887957199b.o  -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib"  -L"C:/R-42~1.2/bin/x64" -lR ; \
    g++ -shared -s -static-libgcc -o file47887957199b.dll file47887957199b-win.def file47887957199b.o  -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib"  -L"C:/R-42~1.2/bin/x64" -lR ; \
  else \
    echo EXPORTS > tmp.def; \
    nm file47887957199b.o | sed -n 's/^.* [BCDRT] / /p' | sed -e '/[.]refptr[.]/d' -e '/[.]weak[.]/d' | sed 's/[^ ][^ ]*/"&"/g'  >> tmp.def; \
    echo g++ -shared -s -static-libgcc -o file47887957199b.dll tmp.def file47887957199b.o  -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib"  -L"C:/R-42~1.2/bin/x64" -lR ; \
    g++ -shared -s -static-libgcc -o file47887957199b.dll tmp.def file47887957199b.o  -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib/x64" -L"C:/rtools42/x86_64-w64-mingw32.static.posix/lib"  -L"C:/R-42~1.2/bin/x64" -lR ; \
    rm -f tmp.def; \
  fi \
fi
Error in compileCode(f, code, language = language, verbose = verbose) : 
  C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file47887957199b.o:file47887957199b.cpp:(.text$_ZN3tbb8internal26task_scheduler_observer_v3D0Ev[_ZN3tbb8internal26task_scheduler_observer_v3D0Ev]+0x1d): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file47887957199b.o:file47887957199b.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x1d): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file47887957199b.o:file47887957199b.cpp:(.text$_ZN3tbb10interface623task_scheduler_observerD1Ev[_ZN3tbb10interface623task_scheduler_observerD1Ev]+0x3a): undefined reference to `tbb::internal::task_scheduler_observer_v3::observe(bool)'C:\rtools42\x86_64-w64-mingw32.static.posix\bin/ld.exe: file47887957199b.o:file47887957199b.cpp:(.text$_ZN3tbb10interface
Error in sink(type = "output") : invalid connection
> 

I have deleted and installed again R, R Studio and rtools but it hasnt worked. Anyone have any suggestions on how to solve this? Thanks a lot for help!

See the Getting Started Guide