Mtasa-blue: MTA compile warnings: overriding /MTd with /MT

Created on 18 Oct 2020  路  3Comments  路  Source: multitheftauto/mtasa-blue

Describe the bug

In debug mode we provide both the /MT and /MTd flags. We should only be providing /MTd when compiling Debug. Edit: or, due to https://github.com/multitheftauto/mtasa-blue/issues/1736#issuecomment-711329132, we should never be providing /MTd.

See /MD, /MT, /LD (Use Run-Time Library) @ docs.microsoft.com for more information on what these flags mean.

I think this is a good small task for anyone interested in learning how Premake works.

To reproduce

Build MTA

Expected behaviour

No warnings

Screenshots

image

bug good first issue

Most helpful comment

Turns out that option already existed in premake and I was just too bad at searching. 馃

All 3 comments

I think there was a compatibility problem with the net module when using debug runtime

Yup. The issue was regarding memory layout being different in some C++ standard containers (primarily std::string) between Debug & Release builds. As we only provide release builds of net, we need to use the release standard containers everywhere.

When I looked at this issue in the past, it was caused by /MTd being added by premake when setting up a debug build, Fixing that involved adding support for our special case to premake itself.

Turns out that option already existed in premake and I was just too bad at searching. 馃

Was this page helpful?
0 / 5 - 0 ratings

Related issues

StifflersMom picture StifflersMom  路  4Comments

ALw7sH picture ALw7sH  路  3Comments

patrikjuvonen picture patrikjuvonen  路  3Comments

CrosRoad95 picture CrosRoad95  路  4Comments

LosFaul picture LosFaul  路  3Comments