尝试在xcode 4中编译项目时出现以下错误(在xcode 3.x中正常工作)
Undefined symbols for architecture i386:
"_OBJC_CLASS_$_FBSession", referenced from:
objc-class-ref in View1Controls.o
"_OBJC_CLASS_$_FBLoginDialog", referenced from:
objc-class-ref in View1Controls.o
"_OBJC_CLASS_$_FBRequest", referenced from:
objc-class-ref in View1Controls.o
"_OBJC_CLASS_$_FBStreamDialog", referenced from:
objc-class-ref in View1Controls.o
ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status
Run Code Online (Sandbox Code Playgroud)
任何人都可以解释什么是错的?我确定我已经正确导入了头文件..
谢谢,
插口
我在用户点击图钉时显示自定义UIView(如Zillow应用程序).现在的问题是我需要将视图放在实际引脚的正上方.MKAnnotationView坐标系与地图相关.如何获取iPhone屏幕的坐标,然后将我的视图放在该坐标上.
- (void)mapView:(MKMapView *)mv didSelectAnnotationView:(MKAnnotationView *)view
{
// get view from storyboard
ZillowSearchResultAnnotation *annotation = (ZillowSearchResultAnnotation *) view.annotation;
PropertyAbstractViewController *propertyAbstractViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"PropertyAbstractIdentifier"];
propertyAbstractViewController.view.frame = CGRectMake(0, 0, 100, 100);
[propertyAbstractViewController bind:annotation.data];
[mv addSubview:propertyAbstractViewController.view];
}
Run Code Online (Sandbox Code Playgroud) 我正在尝试编写一个每天运行一次的Powershell脚本.它将执行的众多功能之一是确保脚本本身是最新的.我的问题是,因为我对脚本进行了版本控制,所以我需要更新我在脚本中创建的计划任务.
我在这里考虑了两种不同的方法,其中我也想不通:
Unregister-ScheduledTask -TaskName "mytask"
然后注册Register-ScheduledTask并使用新路径重新创建它.在选项1失败后,我坚持执行选项2.我能够找到并取消注册我的任务,但是当尝试使用新路径注册它时,我收到以下错误:
Register-ScheduledJob : The scheduled job definition <myTask> already exists in the job definition store.
At line:3 char:1
+ Register-ScheduledJob -Name "<myTask>" -FilePath "C:\Apps\\Uploade ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (Microsoft.Power...edJobDefinition:ScheduledJobDefinition) [Register-ScheduledJob], ScheduledJobException
+ FullyQualifiedErrorId : CantRegisterScheduledJobDefinition,Microsoft.PowerShell.ScheduledJob.RegisterScheduledJobCommand
Run Code Online (Sandbox Code Playgroud)
编辑:为了澄清,我的预定任务路径类似于,C:\ Apps\myscript_v0.0.1.ps1因此,当我更新时,它将变为C:\ Apps\myscript_v0.1.5.ps1或者其他什么,我需要运行新版本而不是当前目标的旧版本.
我正在尝试编写一个简单的c#控制台应用程序,以从与已连接的Arduino通信的串行端口进行读取/写入。我遇到的问题是我可以写Arduino没问题,但是我无法接收任何数据。我的串行端口SerialDataReceivedEventHandler
也从未被解雇过,但是我猜这两个问题是相关的。
我知道不是我的Arduino引起了这个问题,因为使用Arduino IDE时我可以毫无问题地接收数据。这是我现在明智的代码:
SerialPort sPort = new SerialPort();
sPort.PortName = SerialPort.GetPortNames()[0];
sPort.BaudRate = 9600;
sPort.Parity = Parity.None;
sPort.DataBits = 8;
sPort.StopBits = StopBits.One;
sPort.RtsEnable = false;
sPort.Handshake = Handshake.None;
sPort.DataReceived += new SerialDataReceivedEventHandler(sPort_dataReceived);
sPort.ErrorReceived += new SerialErrorReceivedEventHandler(sPort_ErrorReceived);
sPort.Open();
Console.Read();
sPort.Write("tt_calib");
while (true)
{
if (sPort.ReadExisting() != string.Empty)
Console.WriteLine(sPort.ReadExisting());
}
Run Code Online (Sandbox Code Playgroud)
我知道我没有在此代码中关闭端口,这不是问题,因为我每次都可以重新运行并打开它。这段代码也不是最终形式,我试图使read事件正常工作,以便对各种消息做出不同的反应。我已经阅读了每个问题,但没有找到解决方案。
这是在Windows 8.1上运行的C#.NET 4.5控制台应用程序
ios ×2
objective-c ×2
arduino ×1
c# ×1
facebook ×1
iphone ×1
mapkit ×1
mkannotation ×1
powershell ×1
serial-port ×1
windows ×1