Linux native extensions error: Invalid lib - 'libs': 'c++' ext.manifest

I’m trying to add the defold-gamelift module to our project. But when I try to build it I get this error:

Error in 'gamelift/ext.manifest': 
        Invalid lib - 'libs': 'c++'    ext.manifest    /Pewpew/content/gamelift    line 1    Problem
    Build server output: 
        Error in 'gamelift/ext.manifest': Invalid lib - 'libs': 'c++'    ext.manifest    /Pewpew/content/gamelift    

    Unknown    Problem 

The ext.manifest file looks like this:

name: "Gamelift"
platforms:
    x86_64-osx:
        context:
            flags:      ["-std=c++0x", "-stdlib=libc++"]
            libs:       ["c++"]

    x86_64-win32:
        context:
            flags:      ["-std=c++0x", "-stdlib=libc++"]
            libs:       ["c++"]
            
    x86_64-linux:
        context:
            flags:      ["-std=c++0x", "-stdlib=libc++"]
            libs:       ["c++"]

Any ideas on what’s causing this?

For WIn32, it looks like a copy paste (A hint is that the compiler flags never start with a “-” for cl.exe or link.exe)

For Linux (Ubuntu 16.04, gcc 5) , there isn’t any default lib that has the name c++ (or libc++.a/.so) afaik. I’d try without it first.

In general, compiler flags are rarely fully copy-pasteable between platforms (or rather, compilers)

Here are the flags that the compilers support. Defold only supports a subset of these (documentation is coming!), but you’ll get a clear message if you try to use one we don’t support. And we can probably add support for it.

4 Likes