Linking Errors in Qt Creator

I don’t know if this is the best category to post this under, but it seemed to fit it the best. I’ve been trying to build Fritzing from source for a while now, and after 10-12 hours of troubleshooting, I opened a GitHub issue. Basically, I’ve been having some issues with linking errors in Qt Creator which I believe is due to an issue with the libgit2 dependency, although I’ve built the library several times with several versions of MSVC along with building fritzing with many versions of MSVC. Currently, I’m using MSVC 2019 along with the latest version of Qt(5.15.2) on Windows 10.

I managed to install it by following the instructions on https://github.com/fritzing/fritzing-app/wiki/1.-Building-Fritzing
Check that is is placed in the correct folder. You could maybe try to add the library to the PATH environmental variable.

Yeah, I followed and triple checked all of the instructions. Adding it to PATH didn’t seem to help. It seems like it’s detecting libgit2, though

Yes to both!

It took me most of a year to get Windows to compile :slight_smile: , at the time development was dead, and all the Windows build instructions for libgit2 on the web were wrong though (that was 2 or 3 years ago so things may have improved!) While I haven’t built 0.9.5 (the development head) in a year or so, I remember seeing that Visual Studio 2019 was not in one of the .pro file scripts (sorry don’t remember which one!) only VS2017. Didn’t affect me because I was (and am) still running on VS2017, but may well be the reason for your errors. I believe the 0.9.4 release was built with VS2017 and QT 5.12. The first thing I would try is find the script in the phoenix.pro file that refers to VS2017 and add VS2019 to the script. If that doesn’t work, a downgrade to VS2017 should do the trick. I expect that a variable used by the build scripts isn’t being set because the script isn’t recognizing VS2019 from the error messages in the github report. I ran in to an issue where the powershell script that gets the current date runs correctly from the command line but not as part of the script (although I was on Win7 not Win10 at the time.) I never did figure out why, just hard coded the current date in the script and continued.

Peter

Wow, thanks for the help. I’ll try a few of those things when I get a chance. I really haven’t used C++ at all, with the exception of a few projects a little while ago. Nevertheless, I’ll give it a shot and see if I can figure it out. I thought that MSVC2019 was supported, as the build guide says to build libgit2 using MSVC 2019, and I think I tried switching back and forth between versions a few times, but I can give that another shot as well. Once again, thanks for all of the help and suggestions!

It may be by now, as my experience was more than a year ago, but it still may be the answer too as the build script looks to be missing some required parameters from the error message.

Peter

I couldn’t find anything in any of the scripts, and I don’t think I know enough about C++ and/or fritzing to know much of what I’m looking at. I tried building redownloading and building libgit2 v0.28.5 and v0.28.4 but they both came back with the same linking errors.

It looks like the message errors are coming from a message statement that only has a variable defined for Unix systems which seems very odd. I don’t know if that’s related to the errors, but I’ll keep trying stuff in the meantime.

Since your problem appears to be libgit2 (or possibly a missing library that it wants) you may want to try the build in this post:

When I originally wrote this howto VCPKG for libgit2 didn’t work, it appears they fixed it up so it does work now and may be the way forward. There should also be my notes on how I built libgit2 without VCPKG (essentially you need to tell cmake to use VS as a 64bit binary, without that it creates a 32 bit binary which QT rejects.)

Peter

1 Like