2005-01-12 10:08 PM - last edited on 2022-12-13 10:28 PM by Daniel Kassai
2005-01-17 11:24 AM
Oleg wrote:Hi Oleg,
I actively use STL. At linking I got one error like this:
Link Error: undefined std::tr1::detail::shared_ptr_deleter_common.....
If I add the MSL_C++_PPC.Lib library the error gone, however then I
got numerous warnings like:
Link Warning: ignored std::clog (data) in MSL_C++_PPC.Lib
Previouly defined in GSCppRuntimeLib
#define _MSL_NO_LOCALE #define _MSL_MULTITHREAD #define TARGET_API_MAC_CARBON 1That would solve the STL compilation and linking issue.
Oleg wrote:Here you go. The parameter is a unicode string.
PS: And one another Mac specific question.
What function will open some page on default web browser like
ShellExecute on Windows.
bool RunBrowser (const GS::UniString& url) { CFURLRef cfurl = CFURLCreateWithBytes (kCFAllocatorDefault, reinterpret_cast<const UInt8*> (static_cast<const UniChar*> (url.ToUStr ())), url.GetLength () * sizeof(UniChar), kCFStringEncodingUnicode, NULL); OSStatus status = ::LSOpenCFURLRef (cfurl, NULL); CFRelease (cfurl); return (status == noErr); }HTH,
2005-01-17 09:03 PM
Akos wrote:Of course! Why didn't I think of that!
CFURLRef cfurl = CFURLCreateWithBytes (kCFAllocatorDefault, reinterpret_cast<const UInt8*> (static_cast<const UniChar*> (url.ToUStr ())), url.GetLength () * sizeof(UniChar), kCFStringEncodingUnicode, NULL);
2005-01-17 09:47 PM
Why didn't I think of that!Wow, I must really be off today. I didn't think of that either!
2005-01-17 10:13 PM
Akos wrote:Thanks Akos.
This is a serious issue you bumped into.
Akos
2005-01-19 09:08 AM
2005-01-24 09:26 AM
Oleg wrote:MWRon is one of the best support person in the world. We are also getting great support from him.
To finish the thread by happyend.
Ron from Metrowerks was so kind and has sent me the headers I was required. Now I have linked it without warnings.
( Except duplication of GS:: Exception::vt in GSGeometry and GSRootLib, but API example has the same warnings, I think it is OK )
Akos thank you again for the support.
2005-02-09 11:15 AM
Oleg wrote:
I actively use STL. At linking I got one error like this:
Link Error: undefined std::tr1::detail::shared_ptr_deleter_common.....
If I add the MSL_C++_PPC.Lib library the error gone, however then I
got numerous warnings like:
Link Warning: ignored std::clog (data) in MSL_C++_PPC.Lib
Previouly defined in GSCppRuntimeLib
2005-02-14 10:17 PM
Ralph wrote:Yes, you are safe. I would still recommend using the same environment, i.e. compile the MSL headers with:
I don't use the GS Runtime libs at all in my projects. My understanding is that they are simply a recompilation of the standard MSL library (MSL_All_Carbon.Lib) with the appropriate settings for an ArchiCAD add-on, e.g. 'enums always int' set. I rebuilt them myself and use all the latest headers etc provided with CW 9. I get no warnings in compilation or linking.
I would be interested to know if Akos has any comments on this approach.
#define _MSL_NO_LOCALE #define _MSL_MULTITHREAD #define TARGET_API_MAC_CARBON 1Another issue which you might bump into is the newline character problem ('\r' vs '\n'). Coming from the old Mac OS 9 world ArchiCAD still has some places where line ends matter. CW9 has the 'MPW newline' flag removed, which might crash our code, hence we sticked with the 8.3 headers.