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

how to build with msvc toolchain? #4

Open
Eunsolfs opened this issue Dec 2, 2022 · 10 comments
Open

how to build with msvc toolchain? #4

Eunsolfs opened this issue Dec 2, 2022 · 10 comments
Labels
help wanted Extra attention is needed

Comments

@Eunsolfs
Copy link

Eunsolfs commented Dec 2, 2022

hello,can you add a CMake MakeFile ,so we can built this program easily.Absolutely,this program is so great!
thank you

@Lecrapouille
Copy link
Owner

@Eunsolfs Yes I have to deal with it ! I hate CMake (no offense ^^) and I'm not a Windows user. In the previous repo, almost issues concerned CMake for Windows lol That is why I preferred using my Makefile.

What native Windows techno can be used instead for compiling ? We can add a Visual Studio file ?

As quick workaround, you can compile directly:

  • go to zipper/external and see download-external-libs.sh and compile-external-libs.sh for downloading and compile these libs (to be adapated for Windows ?)
  • Adapt the following line for Windows:
cd zipper
g++ --std=c++11 -fPIC -shared -Iinclude -Isrc -I. src/utils/*.cpp src/*.cpp -o libzipper.so external/minizip/build/libminizip.a external/minizip/build/libaes.a external/zlib-ng/build/libz.a

(not verified).

You can provide a pull request, this will help me :)

@Eunsolfs
Copy link
Author

Eunsolfs commented Dec 8, 2022 via email

@demonstan
Copy link

thank you for your help, if i work out, I will upload the entire compile script

---- Replied Message ---- | From | Quentin @.> | | Date | 12/08/2022 02:28 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [Lecrapouille/zipper] how to build with msvc toolchain? (Issue #4) | @Eunsolfs Yes I have to deal with it ! I hate CMake (no offense ^^) and I'm not a Windows user. In the previous repo, almost issues concerned CMake for Windows lol That is why I preferred using my Makefile. What native Windows techno can be used instead for compiling ? We can add a Visual Studio file ? As quick workaround, you can compile directly: go to zipper/external and see download-external-libs.sh and compile-external-libs.sh for downloading and compile these libs (to be adapated for Windows ?) Adapt the following line for Windows: cd zipper g++ --std=c++11 -fPIC -shared -Iinclude -Isrc -I. src/utils/.cpp src/.cpp -o libzipper.so external/minizip/build/libminizip.a external/minizip/build/libaes.a external/zlib-ng/build/libz.a (not verified). You can provide a pull request, this will help me :) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: @.***>

Any update?

@Eunsolfs
Copy link
Author

Eunsolfs commented Jan 4, 2023

谢谢你的帮助,如果我解决了,我会上传整个编译脚本
……
---- 回复消息 ---- | 来自 | 昆汀_@> | | 日期 | 12/08/2022 02:28 | | 至 | _@_ . _> | | 抄送 | _@_ . > @ > | | 主题 | 回复:[Lecrapouille/zipper] 如何使用 msvc 工具链构建?(第4期)|@Eunsolfs是的,我必须处理它!我讨厌 CMake(无意冒犯 ^^)而且我不是 Windows 用户。在以前的 repo 中,几乎所有问题都与 CMake for Windows 相关 lol 这就是为什么我更喜欢使用我的 Makefile。可以使用什么本机 Windows 技术来代替编译?我们可以添加一个 Visual Studio 文件吗?作为快速解决方法,您可以直接编译:转到 zipper/external 并查看 download-external-libs.sh 和 compile-external-libs.sh 以下载和编译这些库(要针对 Windows 进行调整?)调整以下行Windows:cd zipper g++ --std=c++11 -fPIC -shared -Iinclude -Isrc -I。源代码/实用_程序/.cpp 源代码/.cpp -o libzipper.so external/minizip/build/libminizip.a external/minizip/build/libaes.a external/zlib-ng/build/libz.a(未验证)。您可以提供拉取请求,这对我有帮助 :) — 直接回复此电子邮件,在 GitHub 上查看,或取消订阅。您收到此邮件是因为有人提到了您。邮件 ID:@_ .***>

任何更新?

I have to say, I put a lot of effort into making this project a zipper VS project, I used minizip/1.2.13 (this library depends on bzip2/1.0.8
zlib/1.2.13), after compiling minizip/1.2.13, add it to my zipper project, and then start to fix the error in the code, but I can't find the fill_memory_filefunc and the structure ourmemory_t, I checked the information and found that the above related code has been in In minizip, the ioapi_mem.h file has been removed. So I can't fix the error.

I went back and checked the files of the zipper project again, and found that the author requested to use the minizip version of his fork, but I don't know the detailed version of the fork's minizip, nor can I know what version of the library the project depends on. So I'm stuck.

@Lecrapouille
Copy link
Owner

@Eunsolfs @demonstan I tried to add CI for Windows. I made a workaround to find zlib.h but I still have an error with my Makefile I dunno where the error is not very explicit

@Lecrapouille Lecrapouille added the help wanted Extra attention is needed label Jan 11, 2023
@Eunsolfs
Copy link
Author

Eunsolfs commented Feb 3, 2023

In the end, I successfully made this project into a VS project, and the compilation passed

my zipper fork :https://github.com/Eunsolfs/zipper.git

Pull the code to the local through git, open it with VS2022 and compile it

If you use other vs versions, you need to manually modify the relevant values in zipper.vcxproj / zipper.sln with an editor like vscode

@Eunsolfs
Copy link
Author

Eunsolfs commented Feb 3, 2023

The secret of successful compilation is that zipper needs to use a specific version of minizip (https://github.com/Lecrapouille/minizip). The author of zipper also mentioned it in ReadMe, but I didn't read it carefully before...

Versions of other libraries in the external folder:
zlib v1.2.13
zlib-ng v2.0.6

But I don't seem to find traces of using zlib-ng in the source code of zipper. The reason why I added it is because the author of zipper described that zlib-ng needs to be downloaded and compiled in zipper/external/download-external-libs.sh

@Eunsolfs
Copy link
Author

Eunsolfs commented Feb 9, 2023

thank you for your help, if i work out, I will upload the entire compile script

---- Replied Message ---- | From | Quentin @.> | | Date | 12/08/2022 02:28 | | To | _@**._> | | Cc | _@.>@.> | | Subject | Re: [Lecrapouille/zipper] how to build with msvc toolchain? (Issue #4) | @Eunsolfs Yes I have to deal with it ! I hate CMake (no offense ^^) and I'm not a Windows user. In the previous repo, almost issues concerned CMake for Windows lol That is why I preferred using my Makefile. What native Windows techno can be used instead for compiling ? We can add a Visual Studio file ? As quick workaround, you can compile directly: go to zipper/external and see download-external-libs.sh and compile-external-libs.sh for downloading and compile these libs (to be adapated for Windows ?) Adapt the following line for Windows: cd zipper g++ --std=c++11 -fPIC -shared -Iinclude -Isrc -I. src/utils/.cpp src/_.cpp -o libzipper.so external/minizip/build/libminizip.a external/minizip/build/libaes.a external/zlib-ng/build/libz.a (not verified). You can provide a pull request, this will help me :) — Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you were mentioned.Message ID: _@_.*>

Any update?

#4 (comment)

my zipper fork :https://github.com/Eunsolfs/zipper

@Eunsolfs Eunsolfs closed this as completed Feb 9, 2023
@Lecrapouille Lecrapouille reopened this Feb 9, 2023
@Lecrapouille
Copy link
Owner

@Eunsolfs thank you, sorry these last days I did not have ethernet. This could be nice to include your work. Can you provide pull requests ?

@Eunsolfs
Copy link
Author

@Eunsolfs谢谢,抱歉,最近几天我没有以太网。包括您的工作可能会很好。你能提供拉取请求吗?

https: //github.com/Eunsolfs/zipper

@Eunsolfs thank you, sorry these last days I did not have ethernet. This could be nice to include your work. Can you provide pull requests ?
here is my fork
https://github.com/Eunsolfs/zipper.git

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants