How to build skia's static library libskia.a or libskia.so

34 views
Skip to first unread message

Rohan

unread,
Jul 3, 2024, 8:18:34 AMJul 3
to skia-discuss
Hi

I have a separate C++ project  where I want to use SKIA library. 
I have built SKIA  as per the instruction  here - how to build skia
Out\Static  doesn't have libskia.a which I can use in my C++ project.
Do I need to do all development within SKIA repo only?

Please suggest .

John Stiles

unread,
Jul 3, 2024, 9:06:27 AMJul 3
to skia-d...@googlegroups.com
What do you see in the out/Static directory? 


--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/skia-discuss/5e2092db-b2d8-4d03-a8a4-7e5c49144c01n%40googlegroups.com.

Inkling00

unread,
Jul 3, 2024, 9:07:30 AMJul 3
to skia-discuss
If you built it correctly there should be many .a files.

Rohan

unread,
Jul 3, 2024, 9:22:37 AMJul 3
to skia-discuss
The build was successfull. I could also run the HelloWorld.cpp example that is placed within the skia repo.
I built it in out\Release on Windows and I see many .lib files
skia.lib, skottie.lib,skparaghraph.lib etc
The obj created within this folder has .stamp and .ninja files.
But there is no file with .a extension

This is the command I used on Windows

gn gen out/Release --args="is_official_build=true is_component_build=false skia_use_system_freetype2=false skia_use_system_libjpeg_turbo=false skia_use_system_zlib=false skia_use_system_harfbuzz=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_expat=false skia_use_system_icu=false"

ninja -C out/Release



Brian Osman

unread,
Jul 3, 2024, 9:33:40 AMJul 3
to skia-d...@googlegroups.com
Static libraries on Windows typically have a .lib extension, rather than .a (which is more common on Linux and MacOS). skia.lib is the static library that you're looking for.

--
You received this message because you are subscribed to the Google Groups "skia-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to skia-discuss...@googlegroups.com.

Rohan

unread,
Jul 3, 2024, 9:47:20 AMJul 3
to skia-discuss
Many Thanks!
Reply all
Reply to author
Forward
0 new messages