Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

when drop spine extension, build error #2343

Closed
blairwang opened this issue Jan 21, 2025 · 8 comments · Fixed by #2347
Closed

when drop spine extension, build error #2343

blairwang opened this issue Jan 21, 2025 · 8 comments · Fixed by #2347
Milestone

Comments

@blairwang
Copy link
Contributor

in file cocostudio/SpineSkeletonDataCache.h, it includes spine.h

axmol/extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h:4:10: fatal error: 'spine/spine.h' file not found
4 | #include "spine/spine.h"

need add micro to avoid this error

@paulocoutinhox
Copy link
Contributor

Did you use these runtimes?
https://github.com/axmolengine/spine-axmol

@blairwang
Copy link
Contributor Author

blairwang commented Jan 21, 2025

Did you use these runtimes? https://github.com/axmolengine/spine-axmol

Sorry, I didn't use spine in my game.

I just try to build wasm version to see how small the wasm file can be, If I can complete the build, I guess it can be less than 10 MB in demo project, that will be very cool.

@paulocoutinhox
Copy link
Contributor

paulocoutinhox commented Jan 21, 2025

Hi @blairwang,

So, set in your CMakeLists.txt:

set(AX_ENABLE_EXT_SPINE OFF CACHE BOOL "the spine extension" FORCE)

@rh101
Copy link
Contributor

rh101 commented Jan 21, 2025

@blairwang If you have time, please try the changes in PR #2346 to see if it fixes the issue for you.

@paulocoutinhox The problem isn't about setting the cmake option, but that the source code still referencing Spine even when Spine is disabled.

@paulocoutinhox
Copy link
Contributor

Hi,

But if you disable the Spine Extension, the file still included in files to be compile?

I don't understand why extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h is compiled if Spine is disabled and need add code to ignore the file content https://github.com/rh101/axmol/blob/41a33a70a74e18727a002c11888681fc48a327dc/extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h

Is because Spine only disable the runtime and not the spine files inside cocostudio?

Thanks.

@blairwang
Copy link
Contributor Author

Hi,

But if you disable the Spine Extension, the file still included in files to be compile?

I don't understand why extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h is compiled if Spine is disabled and need add code to ignore the file content https://github.com/rh101/axmol/blob/41a33a70a74e18727a002c11888681fc48a327dc/extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h

Is because Spine only disable the runtime and not the spine files inside cocostudio?

Thanks.

Yes, I think it should be fixed...

@blairwang
Copy link
Contributor Author

My first time submit a pr...

#2347

tested ok by myself

@rh101
Copy link
Contributor

rh101 commented Jan 22, 2025

But if you disable the Spine Extension, the file still included in files to be compile?

I don't understand why extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h is compiled if Spine is disabled and need add code to ignore the file content https://github.com/rh101/axmol/blob/41a33a70a74e18727a002c11888681fc48a327dc/extensions/cocostudio/src/cocostudio/SpineSkeletonDataCache.h

Those files are referenced in a lot of places, so a more complete fix would would need to address that, which @blairwang seems to have done in PR #2347.

@halx99 halx99 linked a pull request Jan 23, 2025 that will close this issue
6 tasks
@halx99 halx99 added this to the 2.3.3 milestone Jan 23, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants