Undefined symbols for architecture x86_64
-
After cleaning up all the errors that Xcode was flagging, I get this final error that I really don't know how to solve
Undefined symbols for architecture x86_64:
"maxon::details::ModuleInfoWrapper<8132888662419880549ull>::info", referenced from:
___cxx_global_var_init in Patterner.o
___cxx_global_var_init in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)Can anyone help me?
-
Hi rui_mac, thanks for reaching us.
With regard to the issue reported, looks like there are missing method implementations of some classes in Patterner.cpp.
Could you kindly provide some additional detail on what classes are used and how you're using them there?Last but not least where you able to compile and successfully run the Cinema 4D SDK example sets?
Cheers, Riccardo.
-
These are my #includes:
#include "c4d.h"
#include "c4d_symbols.h"
#include "math.h"
#include "Patterner.h"#include <fstream>
#include <iostream>
#include <string>And I'm using the ShaderData class
-
Oh, and yes, I did managed to compile all the Cinema 4D SDK examples and they are all working fine.
-
Hi rui, thanks for the follow-up.
Before providing details on what's declared inside Patterner.cpp/.h, can you confirm the project where the issue happens is created using the Project Tool? Can you also share the frameworks you're including as dependencies for this project?
It seems like you're not adding the core.framework in the projectdefinition.txt.
Looking forward your input, give best.
Riccardo -
I did create the project with the Project Tool.
My projectdefinition.txt for this particular plugin is:// Supported platforms - can be [Win64;OSX]
Platform=Win64;OSX// Type of project - can be [Lib;DLL;App]
Type=DLL// API dependencies
APIS=image.framework;cinema.framework;mesh_misc.framework;math.framework;crypt.framework;python.framework;core.framework;command.framework// C4D component
C4D=truestylecheck.level=0 // must be set after c4d=true
// Custom ID
ModuleId=com.ruimac.patternerBut I did finally managed to compile it successfully. However, it now crashes Cinema 4D when I add the shader to a material.
And I can't seem to find a way to track what is going wrong -
I honestly don't know what happened to the plugin that this post refers to, as it started compiling without error (although it hangs Cinema 4D, when I try to run it).
But I'm getting the same error with another one:What can be occurring, to be getting these errors?
-
Hi rui_mac, thanks for following up.
But I did finally managed to compile it successfully. However, it now crashes Cinema 4D when I add the shader to a material.
And I can't seem to find a way to track what is going wrongIt's unclear from your previous post what has been changed in order to make it compiling although looks like that the change you brought is leading to further issue during runtime. Can you explain what you did there to get it compiled?
Can you describe step by step approach the process you're using to migrate your project to R20?
To me looks like a systemic issue rather then something related to the specific project.Best, Riccardo
-
This is really weird but after getting this error (and everything all being Ok), the way that I found to get rid of this error is to delete the xcodeproj, the props, the vcxproj and the vcxproj.filters files from the project folder, leaving just the projectdefinition.txt file there, and running the Project Tool again. Then, opening the newly created xcodeproj file, I no longer get this error and it compiles fine.