string can't find
1、缺少c++文件 地址 按照说明操作
2、target --> build Phases --> Link Binary 添加libc++.tbd
3、target --> build setting 按图示设置
macOS no find
target --> build setting --> base SDK 设置为支持的版本
打开文件奔溃问题
1、DataController.mm 164 line方法做如下修改
- (void)writeString:(NSString *)str toFile:(FILE *)pFile
{
if (str) {
fwrite(CSTRING(str), [str length] + 1, 1, pFile);
}
}
2、document.mm 449 line(handleThreadStateChanged)方法作如下修改
- (void)handleThreadStateChanged:(NSNotification *)notification
{
if ([notification object] == dataController)
{
NSString * threadState = [[notification userInfo] objectForKey:MVStatusUserInfoKey];
if ([threadState isEqualToString:MVStatusTaskStarted] == YES)
{
if (OSAtomicIncrement32(&threadCount) == 1)
{
dispatch_async(dispatch_get_main_queue(), ^{
[progressIndicator setUsesThreadedAnimation:YES];
[progressIndicator startAnimation:nil];
[stopButton setHidden:NO];
});
}
}
else if ([threadState isEqualToString:MVStatusTaskTerminated] == YES)
{
if (OSAtomicDecrement32(&threadCount) == 0)
{
dispatch_async(dispatch_get_main_queue(), ^{
[progressIndicator stopAnimation:nil];
[statusText setStringValue:@""];
[stopButton setHidden:YES];
});
}
}
}
}
网友评论