#bad file type. Did you specify a DLL instead of an import library?

1 messages · Page 1 of 1 (latest)

plain ruin
#

I'm upgrading to 2024.11.0-mach. 10.0 worked, but now it fails when linking. Linking isn't my strong suite so would love some help here.

We use a separate library called The-Forge. We wrap this in a "renderer" that sits in a DLL and links to the-forge statically. But the game links dynamically to the DLL (as you would expect) (or at least it should!?). But something with our setup no logner works. Maybe some build API changed?

error: lld-link: C:\Projects\elvengroin-legacy\external\The-Forge\Examples_3\TidesRenderer\PC Visual Studio 2019\x64\Debug\TidesRenderer.dll: bad file type. Did you specify a DLL instead of an import library?

Here is the build.zig for our wrapper:
https://github.com/gmodarelli/The-Forge/blob/tides-of-revival/build.zig

GitHub

The Forge Cross-Platform Rendering Framework PC Windows, Linux, Ray Tracing, macOS / iOS, Android, XBOX, PS4, PS5, Switch, Quest 2 - gmodarelli/The-Forge

plain ruin
#

Bump

uneven edge
plain ruin
#

ok. I tried copying the lib to the output path via an additional addInstallFile but still getting the same message. That's the only direct reference to the .dll.

Should I use something other than
zforge_cpp.linkSystemLibrary("TidesRenderer");

plain ruin
#

I tried renaming the .lib file to TidesRendererLib.lib and changing to
zforge_cpp.linkSystemLibrary("TidesRendererLib");

And now I'm getting other errors (that we also didn't get prior to this version), I'm not sure if that's an improvement or not...

error: lld-link: duplicate symbol: struct CpuInfo * __cdecl getCpuInfo(void)
note: defined at C:\Projects\elvengroin-legacy\external\The-Forge\Common_3\OS\Windows\WindowsBase.cpp:140
note: OS.lib(WindowsBase.obj)
note: defined at TidesRenderer.dll