Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
366 views
in Technique[技术] by (71.8m points)

firebase - Swift Preprocessing Error: Expected end of line in preprocessor expression

Okay so I was solving an issue regarding duplicate symbols in cocoa pods' architecture. After getting the pods installed with the post_install in the accepted solution, I build my xcworkspace project and I run into the following error:

Screenshot of location of file and error.

The error is: Expected end of line in preprocessor expression.
On the line: #if HAVE_FULLFSYNC
In the method: SyncFd(int fd, const std::string& fd_path)
And the location of the file is: Pods/Pods/leveldb-library/env_posix.cc

The Pod I added which started this series of issues is 'CodableFirebase' from here.

And this is my Podfile:

platform :ios, '13.2'

post_install do |installer_representation|
    installer_representation.pods_project.targets.each do |target|
        target.build_configurations.each do |config|
            config.build_settings['GCC_PREPROCESSOR_DEFINITIONS'] = '$(inherited), PodsDummy_Pods=SomeOtherNamePodsDummy_Pods'
        end
    end
end


target 'ShoeSwiperMenus' do
  # Comment the next line if you don't want to use dynamic frameworks
  use_frameworks!

  # Pods for ShoeSwiperMenus
# add the Firebase pod for Google Analytics
pod 'Firebase/Analytics'
# add pods for any other desired Firebase products
# https://firebase.google.com/docs/ios/setup#available-pods
pod 'Firebase/Core'
pod 'Firebase/Firestore'
pod ‘FirebaseUI/Auth'
pod 'FirebaseUI/Google'
pod 'FirebaseUI'
pod 'MaterialComponents/Buttons'
pod 'MaterialComponents/Buttons+Theming'
# pod 'MaterialComponents/schemes/Color'

pod 'Shuffle-iOS'
pod 'JGProgressHUD'
pod 'LBTATools'
pod 'CodableFirebase'

end

When removing the post_install block, I backtrack onto my original error which is:
ld: 202 duplicate symbols for architecture x86_64.
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I'm really out of my depth here... I don't even know how to start solving this (nothing on Google). Please help!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...