Skip to content

utf8 header not found - #5279

Merged
kimkulling merged 2 commits into
assimp:masterfrom
TarcioV:utf-issue
Nov 6, 2023
Merged

kimkulling merged 2 commits into
assimp:masterfrom
TarcioV:utf-issue

Conversation

@TarcioV

@TarcioV TarcioV commented Oct 15, 2023 •

Copy link
Copy Markdown
Contributor

utf8 header not found while compiling assimp with samples.

@umlaeute umlaeute left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i welcome the move from fixing the include-dirs and having a unified #include <utf8.h> wherever it is needed. (the latter part is missing from this patch).

also, i find it somewhat strange that you are adding includes without mentioning that in the commit (it probably should be a separate commit, adding the utf8.h header wherever it has been forgotten)

#include <dxgi1_2.h>
#include <DirectXMath.h>
#include <d3dcompiler.h>
#include <utf8.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do you need to include <utf8.h> here?

#include <stdio.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <utf8.h>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and why do you need to include <utf8.h> here?

Comment thread code/CMakeLists.txt
find_package(utf8cpp CONFIG REQUIRED)
ELSE()
# utf8 is header-only, so Assimp doesn't need to do anything.
INCLUDE_DIRECTORIES("../contrib/utf8cpp/source")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i agree that it is much better to just fix the include path, rather than including different files. based on context as is done now:

#ifdef ASSIMP_USE_HUNTER
#include <utf8.h>
#else
#include "../contrib/utf8cpp/source/utf8.h"
#endif

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

obviously this PR does not (yet) change the actual includes (e.g. in BaseImporter.cpp.

after adding the include_directories, it could be as simple as:

#include <utf8.h>

@kimkulling kimkulling left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks better for me doing it this way.

@kimkulling
kimkulling merged commit 46b19cc into assimp:master Nov 6, 2023
@kimkulling

Copy link
Copy Markdown
Member

Merged, thanks a lot for your contribution.

rajsingh82 added a commit to Esri/assimp that referenced this pull request Jan 13, 2025
- update assimp.lua file to disable unsupported models
- include path for utf8cpp source as supported by assimp#5279
- include reverted changes from commit 15d938e - Revert "Assorted compile fixes"
- include reverted changes from commit 61f4618 - Revert "unicode: Switch to boost::nowide::fopen"
- include reverted changes from commit c2e5d2a - Revert "collada: Read all instance_material child nodes"
- auto generated config.h file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

3 participants