abbeycode / UnrarKit

Easily read RAR archives on Mac and iOS
BSD 2-Clause "Simplified" License
313 stars 93 forks source link

Realm and UnrarKit both have a list.hpp header #90

Closed zhouluyao2020 closed 2 years ago

zhouluyao2020 commented 4 years ago

i use "pod Realm" in project,botn UnrarKit and Realm contains list.hpp file,#include "list.hpp" in Realm Invoked UnrarKit,Can you rename for list.hpp.

abbeycode commented 4 years ago

Unfortunately, list.hpp is part of the rarlib source code, which I don't modify directly. I keep it as-is. Can you please show me exactly the error you're seeing?

zhouluyao2020 commented 4 years ago

in Xcode,new Project ,use cocoapod add pod 'UnrarKit', '~> 2.7.1' ,pod 'RealmSwift', '3.17.3',you will see the error

abbeycode commented 3 years ago

I've made a patch in the issue90 branch, if you'd like to test that out. If it works, I'll consider merging it in, but I'm a little hesitant to arbitrarily remove a file the library ships with. Have you tried asking Realm whether they'd consider naming theirs something less generic, as it appears that for them it's not an external dependency but rather a file they wrote and maintain?

abbeycode commented 3 years ago

@zhouluyao2020 I'm going to close this now. If it's still an issue for you, reopen it when you're ready to discuss whether the issue90 branch fixes this for you.

syedecryptr commented 3 years ago

I am also facing the same issue please considerr merging issue90 branch.

abbeycode commented 3 years ago

@syedecryptr Thanks for reaching out! Did you try using issue90 and verify the items below? If so, I'm happy to merge into the v2.10 branch which I'm hoping to release soon-ish.

  1. The library works as expected
  2. UnrarKit still performs as expected
zhouluyao2020 commented 3 years ago

I change the list.hpp and list.cpp filename to listForUnrar.hpp and listForUnrar.cpp in my local pod project,it's work for me.awesome library,hope naming the filename add prefix less generic.

abbeycode commented 3 years ago

@zhouluyao2020 As I mentioned to @syedecryptr above, if you'd like to verify the two items I listed in the issue90 branch, I can merge it in for the next release. It basically looks like UnrarKit doesn't need the rar library's list.hpp, so I'm able to exclude it altogether (even better than a prefix!).

syedecryptr commented 3 years ago

I installed the issue90 branch with the help of this answer and :

  1. The library works as expected.
  2. I was able to unrar all three kinds of files RAR, RAR5, and RAR with a password.

To be more exact I was working on a plugin for flutter using this library unrar_file and it was working as expected but when I tried it in my application it was failing because several other plugins were dependent on Realm and this issue was occurring. I then used the issue90 branch and it started working perfectly fine.

abbeycode commented 2 years ago

Thanks to everyone who wrote in about this one. I’ve merged in the fix, for inclusion in v2.11. I’m trying to get a beta of v2.11 out soon to CocoaPods and Carthage.