Skip to content

Conversation

@sergeypdev
Copy link
Contributor

No description provided.

@sergeypdev
Copy link
Contributor Author

sergeypdev commented Feb 5, 2024

I'm getting a bunch of link errors when trying to include "assimp/cimport.h", do you know why that might be? When I use cpp includes it works fine.

It doesn't matter if cimport.h is included from zig or cpp or c, it always fails with link errors.

error: lld-link: undefined symbol: Assimp::IOSystem::CurrentDirectory() const
    note: referenced by assimp.lib(Assimp.obj):(vtable for Assimp::IOSystem)
    note: referenced by assimp.lib(DefaultLogger.obj)
    note: referenced by assimp.lib(Importer.obj)
    note: referenced 2 more times
error: lld-link: undefined symbol: Assimp::XFileImporter::XFileImporter()
    note: referenced by <redacted>\zig\p\1220aaf8926d1c86fe87b4ddf85159f87803d563a9bf583f565df0d3e0b289488a79\code\Common\ImporterRegistry.cpp:234
    note:               assimp.lib(ImporterRegistry.obj):(Assimp::GetImporterInstanceList(std::__1::vector<Assimp::BaseImporter*, std::__1::allocator<Assimp::BaseImporter*>>&))
...

@sergeypdev
Copy link
Contributor Author

Figured it out, build script was slightly wrong

@sergeypdev sergeypdev changed the title Add missing installArtifact Add missing installArtifact and fix build Feb 5, 2024
@ikskuh
Copy link
Collaborator

ikskuh commented Feb 5, 2024

Can you please split that PR into one that fixes actual bugs and the other one introducing breaking changes? I don't see doing the breaking changes yet

@sergeypdev
Copy link
Contributor Author

@MasterQ32 by breaking changes do you mean changes to format names?

@ikskuh
Copy link
Collaborator

ikskuh commented Feb 5, 2024

Yes, exactly. Adding new formats is fine, but breaking the lib without a really good technical reason isn't a good idea. This is a pure rename thing, so it's not really worth to do it

@sergeypdev
Copy link
Contributor Author

It's actually part of the fix. Format names are used as part of the macro ASSIMP_BUILD_NO_{}_IMPORTER. Previously some format names didn't match what was in assimp, so it failed to remove unused importers from the ImporterRegistry and caused missing symbols.

@ikskuh ikskuh merged commit 6cdee32 into allyourcodebase:master Feb 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants