Hello and good afternoon,
I am trying to make a couple extensions for my project, one of them deppends on zlib,
however i am not sure how to add this to the extension, first, i know Defold has some zlib functions in the engine, so i thought i wouldnt need to link against it, well I still got errors for unknown symbols, so i added the “lib” folder and inside it i created the “x86_64-win32” folder (because i am on win 64), there i dropped my own compiled version of zlib, statically compiled with msvc 14/VS 2017 (file is “zlibstatic.lib”);
In the ext.manifest file i added the following code:
name: “filezipper”
platforms:
x86_64-win32:
context:
libs: [“zlibstatic”, “c++”]
and it didnt work, i got a the following error:
“Error in ‘filezipper/ext.manifest’: Invalid lib - ‘libs’: ‘zlibstatic’ ext.manifest”
so i tried “zlibstatic.lib” and got…
“Error in ‘filezipper/ext.manifest’: Invalid lib - ‘libs’: ‘zlibstatic.lib’ ext.manifest”
so now here i am, out of ideas…What is the correct way to add a .lib to my project? can anyone point me to the right direction please? Thanks~~

1 Like
If you need libz, it’s just
libs: ["z", "c++"]
You don’t need to supply it.
If you want to use some static lib, just drop it under the extension/lib/ folder for each corresponding platform and it will be loaded.
2 Likes
Hello,
sorry if I’m replying to this post, but I think my question is pretty related to it: basically my extension needs crypto32.lib and it seems that the libs attribute doesn’t work well with it - it adds “lib” as prefix and thus it’s not able to find the right filename. Is there a viable workaround? I already tried to put it by hand in my project (and it works) but I can’t include it because of obvious legal reasons (it’s a part of the Windows SDK, located in \Windows Kits\8.1\Lib\winv6.3\um\x64).
Thanks,
G.
Hmm, I see that there are some discrepancies with the lib naming for the libs you put in the “libs/xx-win32” folders, but since this is a system lib, you should be able to use the correct name unmodified:
name: testmodule
platforms:
x86_64-win32:
context:
libs: ["Crypt32.Lib"]
1 Like
Hey,
it works, thank you! Oddly yesterday I already tried this fix, but without success. May it be a subtle bug of Defold Editor? I’m using the latest version 2.
G.
1 Like