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

Call to undeclared function 'SD_LOG'; ISO C99 and later do not support implicit function declarations #112

Closed
Jack-Rain opened this issue Jul 26, 2024 · 11 comments

Comments

@Jack-Rain
Copy link

Jack-Rain commented Jul 26, 2024

When I use "pod 'SDWebImageWebPCoder', :path=> '/Users/xxx/SDWebImageWebPCoder-master'" to point SDWebImageWebPCoder to a local file, I get the error "Call to undeclared function 'SD_LOG'; ISO C99 and later do not support implicit function declarations" during compilation.

@dreampiggy
Copy link
Contributor

dreampiggy commented Jul 26, 2024

Upgrade to the latest version, I think this already been fixed. This macro exists in SDInternalMacros.h, which the private search path pointed to

https://github.com/SDWebImage/SDWebImageWebPCoder/blob/master/SDWebImageWebPCoder/Private/SDInternalMacros.h

@Jack-Rain
Copy link
Author

Upgrade to the latest version, I think this already been fixed. This macro exists in SDInternalMacros.h, which the private search path pointed to

https://github.com/SDWebImage/SDWebImageWebPCoder/blob/master/SDWebImageWebPCoder/Private/SDInternalMacros.h

it is already the latest version

@dreampiggy
Copy link
Contributor

You can check your environment, open in Xcode project and jump into SDImageWebPCoder.m, go to

#import "SDInteralMacros.h"

Command + Click this line, where that SDInternalMacros.h pointed to ? Is that a broken file or something inside SDWebImage (not SDWebImageWebPCoder ?)

@Jack-Rain
Copy link
Author

You can check your environment, open in Xcode project and jump into SDImageWebPCoder.m, go to

#import "SDInteralMacros.h"

Command + Click this line, where that SDInternalMacros.h pointed to ? Is that a broken file or something inside SDWebImage (not SDWebImageWebPCoder ?)

It points to SDWebImageWebPCoder where the definition of SD_LOG is not included.

@Jack-Rain
Copy link
Author

SDTest.zip
This demo can reproduce the issue

@dreampiggy
Copy link
Contributor

Is this because the SDInternalMacros.h copied from SDWebImage Core is not updated ?

@dreampiggy
Copy link
Contributor

I mean, where this SD_LOG is used ? SDWebImageWebPCoder itself seems does not have any call to this SD_LOG macro

@dreampiggy
Copy link
Contributor

I guess it's bug or issue on CocoaPods.

These 2 repo contains different path for the same file name SDInternalMacros.h, but it should not cause issue, if exists, it's Package Manager's bug (CocoaPods)

@Jack-Rain
Copy link
Author

I mean, where this SD_LOG is used ? SDWebImageWebPCoder itself seems does not have any call to this SD_LOG macro
image

@Jack-Rain
Copy link
Author

I guess it's bug or issue on CocoaPods.

These 2 repo contains different path for the same file name SDInternalMacros.h, but it should not cause issue, if exists, it's Package Manager's bug (CocoaPods)

maybe

@dreampiggy
Copy link
Contributor

For local development, avoid the default configuration and always use

install! 'cocoapods', :generate_multiple_pod_projects => true

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

2 participants