How to create a Windows release build?

I fixed problem 1 and problem 3, but the second problem is still there:
/usr/local/bin/lld-link: error: unknown file type: x64\Release\sqlite3.obj

I don’t understand why this error happens, I stored sqlite3.lib in dsqlite3/lib/x86_64-win32 folder, why the linker tried to find sqlite3.obj? This extension can be built without any error if I turned off ‘use-clang’ option.

BTW, I used static library instead of including sqlite3.c source code because defold tried to compile .c file with c++ compiler and cause build errors Compile C files with C++ compiler while building native extension (DEF-3084). I just verified this bug is still there.

Please see following extension manifest file for more detail.

name: "dsqlite3"

platforms:
    arm64-ios:
        context:
            flags:      ["-std=c++11", "-stdlib=libc++"]
            libs:       ["z", "c++", "sqlite3"]

    armv7-ios:
        context:
            flags:      ["-std=c++11", "-stdlib=libc++"]
            libs:       ["z", "c++", "sqlite3"]

    x86-osx:
        context:
            flags:      ["-std=c++11", "-stdlib=libc++"]
            libs:       ["z", "c++", "sqlite3"]

    x86_64-osx:
        context:
            flags:      ["-std=c++11", "-stdlib=libc++"]
            libs:       ["z", "c++", "sqlite3"]
1 Like