Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Compiling SDWebImage demo: libwebp/src/utils/random.c not found

On MacOS Mavericks I'm trying to compile SDWebImage demo.

I have checked out the lastest release with

git clone https://github.com/rs/SDWebImage.git

and opened SDWebImage Demo.xcodeproj in Xcode 5.0.2.

Building the project however fails with (here full-sized screenshot):

clang: error: no such file or directory: 'SDWebImage/Vendors/libwebp/src/utils/random.c'
clang: error: no input files

enter image description here

Where do I get this random.c please?

Or maybe it's possible to configure SDWebImage without webP support and then I won't need it?

UPDATE:

I've noticed that libwebp is a "git submodule" of the "SDWebImage" project - because when I was checking out again with SourceTree I have seen:

Submodule 'SDWebImage' (https://github.com/rs/SDWebImage.git) registered for path 'SDWebImage'
Cloning into 'SDWebImage'...
Submodule path 'SDWebImage': checked out '42f97369726f1ee282b40b63616e339adfcb2c8a'
Submodule 'Vendors/libwebp' (http://git.chromium.org/webm/libwebp.git) registered for path 'Vendors/libwebp'
Cloning into 'Vendors/libwebp'...
Submodule path 'Vendors/libwebp': checked out '68e7901da53cbda6ec93ddf93e039346d3c6a531'
Completed successfully

Unfortunately, I don't know git that well yet and have to read on it - why wasn't this submodule downloaded when I cloned "SDWebImage"...

like image 888
Alexander Farber Avatar asked Dec 01 '22 19:12

Alexander Farber


2 Answers

this works for me :

git clone --recursive https://github.com/rs/SDWebImage.git
like image 122
Ahad Porkar Avatar answered Dec 09 '22 09:12

Ahad Porkar


Try https://chromium.googlesource.com/webm/libwebp/+/refs/heads/master/src/utils

I have downloaded it and my build is ok:

enter image description here

like image 40
stosha Avatar answered Dec 09 '22 09:12

stosha