Chatterino / chatterino2

Chat client for https://twitch.tv
MIT License
2.06k stars 449 forks source link

Unable to build in Windows 10. Having trouble with Boost. #3793

Closed Jaxkey closed 2 years ago

Jaxkey commented 2 years ago

Checklist

Describe your issue

Following the Windows 10 build instructions for Boost along with other components. Build fails in Qt with the error:

..\chatterino2\src\PrecompiledHeader.hpp(124): fatal error C1083: Cannot open include file: 'boost/current_function.hpp': No such file or directory
jom: C:\Users\(user)\source\repos\build-chatterino-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\Makefile.Debug [debug\chatterino_pch.obj] Error 2
jom: C:\Users\(user)\source\repos\build-chatterino-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\Makefile [debug] Error 2
22:38:48: The process "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" exited with code 2.
Error while building/deploying project chatterino (kit: Desktop Qt 5.15.2 MSVC2019 64bit)
When executing step "Make"

When messing around to try and find a solution, I saw this in the message output: Project MESSAGE: Using default boost directory C:\local\boost\. When I moved all of the Boost files straight into the boost folder (C:\local\boost\[files], instead of what the guide says C:\local\boost\lib\[files]), I got a bit further but then received this error:

LINK : fatal error LNK1104: cannot open file 'libboost_filesystem-vc142-mt-gd-x64-1_76.lib'
jom: C:\Users\(user)\source\repos\build-chatterino-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\Makefile.Debug [debug\chatterino.exe] Error 1104
jom: C:\Users\(user)\source\repos\build-chatterino-Desktop_Qt_5_15_2_MSVC2019_64bit-Debug\Makefile [debug] Error 2
22:27:46: The process "C:\Qt\Tools\QtCreator\bin\jom\jom.exe" exited with code 2.
Error while building/deploying project chatterino (kit: Desktop Qt 5.15.2 MSVC2019 64bit)
When executing step "Make"

I've tried reinstalling and have made sure to install Boost 14.2 version for VS 2019, but still nothing.

Thank you for the help!

Screenshots

No response

OS and Chatterino Version

Windows 10 64 (Chatterino 2.3.5)

pajlada commented 2 years ago

You most likely downloaded the boost library for Visual Studio 2022 while you're building with Visual Studio 2019 - the links in our build page are all for Visual Studio 2022. You can find the one for Visual Studio 2019 here: https://sourceforge.net/projects/boost/files/boost-binaries/1.79.0_b1/ (look for vc142 instead of vc143)

EDIT: I just read the last part of your issue stating you tried that, by "but still nothing" what error are you seeing? And could you take a screenshot of your C:\local\boost\lib directory?

Jaxkey commented 2 years ago

Sorry I didn't make it clear above. The errors from my original post are the ones that occurred while using 14.2. I just tried re-downloading the 14.2 library with the link above but still got the same errors from my original post.

C:\local\boost\lib screenshot: libfolder

Maybe I should try Visual Studio 2022? The reason I didn't before was because I didn't see an option to configure with MSVC2022 in Qt; only MSVC2019.

Felanbird commented 2 years ago

image

I'm going to go out on a limb here and say I assume that lib64-msvc-14.2 folder looks something like this? image

Jaxkey commented 2 years ago

Just got it to work!

I got confused in the instructions when it said rename the C:\local\boost\boost_1_79_0_b1_rc1 (or similar) directory to simply lib (C:\local\boost\lib). I thought it meant rename the original folder it installs (for me was boost_1_76_0) to lib.

It was actually the folder lib64-msvc-14.2 that needed to be renamed to just lib (it has the same files as Felanbird's pic above). rename After I changed that folder to just lib it built successfully.

Thank you guys for the help!

Felanbird commented 2 years ago

I got confused in the instructions when it said rename the C:\local\boost\boost_1_79_0_b1_rc1 (or similar) directory to simply lib (C:\local\boost\lib). I thought it meant rename the original folder it installs (for me was boost_1_76_0) to lib.

Resolved confusion in b580b98, minor oversight in the most recent docs update. Thanks for bringing it to our attention 👍