Skip to content

Conan building GDAL as a 32-bit library despite 64bit make flags specified. #12

@ssav7912

Description

@ssav7912

I recently did a recompile of the GDAL libraries packaged with UnrealGDAL via ue4cli. This builds without issue. However, when doing the build of the game project the plugin is a part of, I get a whole bunch of unresolved external symbol errors (basically one for every GDAL function I refer to), alongside this message:

[snip]\Plugins\UnrealGDAL\Source\GDAL\precomputed\5.0\Win64\lib\gdal.lib warning LNK4272: library machine type 'x86' conflicts with target machine type 'x64'.

This has only occurred recently. I'm unsure why a 32 bit library would be being compiled, every inspection of makefiles and logs suggest that a 64bit build is being targeted. Comparing the generated binaries between old and new compile does reveal that they are different in size (~24MB) and contents, so something is happening.

Using dumpbin.exe to find the machine type shows that it is in fact a 32bit library:
new gdal.lib:

��Microsoft (R) COFF/PE Dumper Version 14.33.31629.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file .\precomputed\5.0\Win64\lib\gdal.lib

File Type: LIBRARY

FILE HEADER VALUES
             14C machine (x86)

old gdal.lib:

��Microsoft (R) COFF/PE Dumper Version 14.33.31629.0
Copyright (C) Microsoft Corporation.  All rights reserved.


Dump of file .\precomputed\5.0_old\Win64\lib\gdal.lib

File Type: LIBRARY

FILE HEADER VALUES
            8664 machine (x64)

I have attempted to specify different compilers/toolchains, to no luck (i'm not even sure if I am successfully retargeting Conan).

I've attempted the instructions here and here, but that does not appear to have done anything significant.

As far as I'm aware there's very little that has changed on my system between now and the last time I compiled this, which makes this even more perplexing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions