You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Edit 2: Alright, I've got our game compiling, linking, building, and running with Axmol 2.1.2 now. Thanks to everyone whose kept Cocos2d-x alive through this project alive, especially halx99!
Edit: The issue below was just me being a fool and not adding the main.cpp file to the project target. I'm still getting issues from the linker, though this time about several hundred duplicate symbols. Hopefully I'll be able to work these issues out quickly and painlessly tomorrow morning when I'm back at the office.
Sorry for wasting anyone's time. I've left my old message below for archival purposes.
So I'm attempting to port our Cocos2d-x v3.17.2 project over to Axmol, for many reasons including future proofing and Metal renderer support.
I work professionally for a small team and we use Perforce for version control, and Xcode, Android Studio, and Visual Studio for MacOS/iOS, Android, and Windows respectively.
Since there are multiple of us that might need to work on the project I need to set up the project to point to files irrespective of the users individual file system schema, operating system, and installed libraries.
I believe I've gotten this far, and have gotten to the point where Xcode compiles all of our project code, the source code for Axmol, the Extensions, and the third party libraries.
I'm able to get a blank project to compile properly with this setup, however I receive linker errors from Xcode when attempting to build the project with our game code in it.
Specifically the error I'm receiving now is:
Undefined symbols for architecture arm64:
"_main", referenced from:
implicit entry/start for main executable
(maybe you meant: _jinit_d_main_controller, _j12init_d_main_controller , _jinit_c_main_controller , _j16init_c_main_controller , _j12init_c_main_controller , _j16init_d_main_controller )
ld: symbol(s) not found for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
I've been struggling with this issue all day now, and haven't made any progress. Before this error, I do get numerous warnings from the linker tool saying that the object files were build for a new macOS version (12.7) than being linked (10.15), and I haven't been able to figure out how to force Axmol to compile its pre-compiled libraries with a different macOS target version (to ensure our game still runs on all the devices that can currently run it after the engine update). But I also don't think this warning is the cause of the linker error, though I could definitely be wrong about that.
In order to clean up those warnings however I did setup zlib to compile as a dependency rather than linking to the pre-compiled static library. This removed the warnings for the objects linking to zlib, but not for jpeg-turbo or curl. I tried, and was unable to get jpeg-turbo to compile as a dependency like zlib though, due to not knowing/understanding how the jpeg-turbo configuration works.
Preferably I'd like curl and jpeg-turbo to also be compile time dependencies, rather than pre-compiled linked binaries, but this isn definitely not a requirement. I'd just like to get the project running with Axmol at this point.
Thanks to anyone who reads this and/or helps me out!
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Edit 2: Alright, I've got our game compiling, linking, building, and running with Axmol 2.1.2 now. Thanks to everyone whose kept Cocos2d-x alive through this project alive, especially halx99!
Edit: The issue below was just me being a fool and not adding the main.cpp file to the project target. I'm still getting issues from the linker, though this time about several hundred duplicate symbols. Hopefully I'll be able to work these issues out quickly and painlessly tomorrow morning when I'm back at the office.
Sorry for wasting anyone's time. I've left my old message below for archival purposes.
Beta Was this translation helpful? Give feedback.
All reactions