Fixing XCode Errors while building rnaEffect External
Posted: Wed Feb 04, 2009 10:09 pm
I've been trying to move over to the Mac side with my externals and I'm starting from the ground up. I began by building the example externals that Mark Waddingham had put together for the tutorials via the newsletter.
The problem is that I am running XCode 3.1.2 on Mac OS X 10.5.6, and I can't seem to get the Universal version of the rnaEffect external to compile.
I keep getting 3 compiler errors originating from the variable.cpp file, and it only happens when I compile in Debug, Release or Release x86-32. The error is the same and affects 3 lines. An example of the error is...
The code in question is:
The full set of code that's having problems is...
Does anyone have any idea on how to resolve these errors?
The problem is that I am running XCode 3.1.2 on Mac OS X 10.5.6, and I can't seem to get the Universal version of the rnaEffect external to compile.
I keep getting 3 compiler errors originating from the variable.cpp file, and it only happens when I compile in Debug, Release or Release x86-32. The error is the same and affects 3 lines. An example of the error is...
Code: Select all
/rnaeffect/variable.cpp:159: error: invalid conversion from 'const char*' to 'char*'
Code: Select all
t_ex_string . buffer = p_string . data();
Code: Select all
void Variable::SetStringElement(const char *p_key, const std::string& p_string)
{
ExternalString t_ex_string;
t_ex_string . buffer = p_string . data(); // This produces an Error
t_ex_string . length = p_string . length();
SetRawStringElement(p_key, t_ex_string);
}
void Variable::SetCStringElement(const char *p_key, const char *p_cstring)
{
ExternalString t_ex_string;
t_ex_string . buffer = p_cstring; // This produces an Error
t_ex_string . length = strlen(p_cstring);
SetRawStringElement(p_key, t_ex_string);
}
void Variable::SetRawBufferElement(const char *p_key, const void *p_buffer, unsigned int p_length)
{
ExternalString t_raw_string;
t_raw_string . buffer = (const char *)p_buffer; // This produces an Error
t_raw_string . length = p_length;
SetRawStringElement(p_key, t_raw_string);
}