Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Error #87

Closed
lakluklak opened this issue Aug 12, 2022 · 9 comments
Closed

Build Error #87

lakluklak opened this issue Aug 12, 2022 · 9 comments

Comments

@lakluklak
Copy link

Hi! I'm trying to build the latest version, but when I follow the build guide step-by-step and open project in VS2022, I get this error:

C:/vcpkg/scripts/buildsystems/vcpkg.cmake:573(_add_executable):
target "hivewe" links to target "qt5::gui" but the target was not found. Perhaps a find_package() call is missing for an imported target, or an alias target is missing?

Can you help me how to build?

@BogdanW3
Copy link
Contributor

BogdanW3 commented Aug 12, 2022

QT-Advanced-Docking-System still uses qt5 by default, you will have to find and modify its vcpkg.json file in your vcpkg to use qtbase instead of qt5-base, and remove the qt5-x11extras dependency if you want to make the port functional for non-windows as well

@lakluklak
Copy link
Author

lakluklak commented Aug 12, 2022

QT-Advanced-Docking-System still uses qt5 by default, you will have to find and modify its vcpkg.json file in your vcpkg to use qtbase instead of qt5-base, and remove the qt5-x11extras dependency if you want to make the port functional for non-windows as well

Hi, thanks for your help I got it and done that step.
But now I get another error when building the tool, I don't know much about C++ so don't know how to fix this. Can you help me check it out?

Error: LNK2019 - unresolved external symbol GetCascError referenced in function "public: class casc::File __cdecl casc::CASC::file_open(class std::filesystem::path const &)const " (?file_open@CASC@casc@@qeba?AVFile@2@AEBVpath@filesystem@std@@@z::<!CASC>)

image

@BogdanW3
Copy link
Contributor

Ah, more of the vcpkg stuff being out of date 😄
extract this into the vcpkg/ports folder and it should be fixed: casclib.zip

@lakluklak
Copy link
Author

lakluklak commented Aug 14, 2022

Ah, more of the vcpkg stuff being out of date 😄 extract this into the vcpkg/ports folder and it should be fixed: casclib.zip

Hi, Thanks to you, I built it successfully.
But now i get another error when running tool. It shows something like this and then shutdown itself

image

@BogdanW3
Copy link
Contributor

I swear if anyone reads this thread, they're going to hate vcpkg 😄
That is also an issue with VCPKG, namely that it doesn't copy over QT6 plugins over into the build directory.
Go to C:\vcpkg\installed\x64-windows, and copy the Qt6 folder over to the folder where the exe is

@lakluklak
Copy link
Author

lakluklak commented Aug 14, 2022

I swear if anyone reads this thread, they're going to hate vcpkg 😄 That is also an issue with VCPKG, namely that it doesn't copy over QT6 plugins over into the build directory. Go to C:\vcpkg\installed\x64-windows, and copy the Qt6 folder over to the folder where the exe is

Hi, I done that but it still happen same error, here are my exe's folder. I don't know where I did wrong.

image

When I open it with command promt, it show up like this and then close itself
image

@BogdanW3
Copy link
Contributor

BogdanW3 commented Aug 14, 2022

You copied from the Qt6 folder, instead of copying the folder itself, but it seems that might be semi-working. I still don't recommend it, you should have a Qt6 folder in that "release" folder, and plugins folder should be inside.

As for it breaking on shaders and the SLK files, is your Data folder empty or does it have subfolders like "icons" "shaders" etc?
What the guide recommended was to run VS as admin so it can symlink from that Data folder to HiveWE/Data, but you can just copy files from the HiveWE/Data folder into that Data folder.

@lakluklak
Copy link
Author

You copied from the Qt6 folder, instead of copying the folder itself, but it seems that might be semi-working. I still don't recommend it, you should have a Qt6 folder in that "release" folder, and plugins folder should be inside.

As for it breaking on shaders and the SLK files, is your Data folder empty or does it have subfolders like "icons" "shaders" etc? What the guide recommended was to run VS as admin so it can symlink from that Data folder to HiveWE/Data, but you can just copy files from the HiveWE/Data folder into that Data folder.

Hi, thanks for your answer.

I did copy the Qt6 folder into exe's folder, but when I ran tool, it will say that " could not find qt platform plugin windows in ". But when I copy the plugins in Qt6 folder, it's won't happen that error, instead, It happen like the 2nd picture.
And I did copy the Data folder in Release into Exe's folder but still happen the same error. So I don't know where did I wrong.

@stijnherfst
Copy link
Owner

Most of these issues were resolved by improving the build system and updating code. The only issue should be that you need to copy the imageformats and platforms folders from C:\vcpkg\buildtrees\qtbase\x64-windows-rel\Qt6\plugins to be next to the built .exe. The .exe will now be under HiveWE/build/<release or debug>/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants