iOS - 链接器错误、重复符号

2024-01-06

似乎我在尝试编译时遇到错误,它似乎直接指向两个文件..MenuViewController 和 FirstTopViewController。我认为这与我的导入有关,因为它们每个都在导入另一个,但是错误引用了我的 Building 对象,该对象几乎没有在其中使用。另外,出现 clang 错误时,如何使用 -v 来查看调用?

Error:

ld: duplicate symbol _OBJC_CLASS_$_Building in /Users/alexmuller/Library/Developer/Xcode/DerivedData/ECSlidingViewController-gjxwxiwumgohyehiawnlamggzmop/Build/Intermediates/ECSlidingViewController.build/Debug-iphonesimulator/ECSlidingViewController.build/Objects-normal/i386/FirstTopViewController.o and /Users/alexmuller/Library/Developer/Xcode/DerivedData/ECSlidingViewController-gjxwxiwumgohyehiawnlamggzmop/Build/Intermediates/ECSlidingViewController.build/Debug-iphonesimulator/ECSlidingViewController.build/Objects-normal/i386/MenuViewController.o for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

首先TopViewController.h

#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#import "ECSlidingViewController.h"
#import "MenuViewController.h"
#import "TimesViewController.h"
#import "BuildingViewController.h"
#import "BuildingAnnotation.h"
#import <MapKit/MapKit.h>

@class BuildingViewController;

@interface FirstTopViewController : UIViewController <MKMapViewDelegate> {
    IBOutlet MKMapView *_map;
    BuildingViewController *buildingVC;
    BuildingAnnotation *buildAnnotation;
}

@property (nonatomic, strong) MKMapView *map;

- (IBAction)revealMenu:(id)sender;
- (IBAction)revealTimes:(id)sender;
- (void)loadBuilding:(Building *)building;

@end

首先TopViewController.m

#import "FirstTopViewController.h"

@implementation FirstTopViewController

@synthesize map = _map;

- (void)viewDidLoad {

    buildingVC = (BuildingViewController *)[self.storyboard instantiateViewControllerWithIdentifier:@"BuildingList"];
    [super viewDidLoad];
}

- (void)viewWillAppear:(BOOL)animated
{
    [(UIView *)[self.view viewWithTag:10] setBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"RedWithNoise"]]];
    [super viewWillAppear:animated];
    [[UINavigationBar appearance] setBackgroundImage:[UIImage imageNamed:@"toolbar"] forBarMetrics:UIBarMetricsDefault];
    [[UINavigationBar appearance] setTitleTextAttributes:
     [NSDictionary dictionaryWithObjectsAndKeys:
      [UIColor colorWithRed:204.0/255.0 green:204.0/255.0 blue:102.0/255.0 alpha:1.0], 
      UITextAttributeTextColor, 
      [UIColor colorWithRed:0.0 green:0.0 blue:0.0 alpha:0.8], 
      UITextAttributeTextShadowColor, 
      [NSValue valueWithUIOffset:UIOffsetMake(0, -1)], 
      UITextAttributeTextShadowOffset, 
      [UIFont fontWithName:@"AGaramondPro-Regular" size:23.0], 
      UITextAttributeFont, 
      nil]];
    self.view.layer.shadowOffset = CGSizeZero;
    self.view.layer.shadowOpacity = 0.75f;
    self.view.layer.shadowRadius = 10.0f;
    self.view.layer.shadowColor = [UIColor blackColor].CGColor;
    self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.layer.bounds].CGPath;
    self.view.clipsToBounds = NO;

    MKCoordinateRegion viewRegion = MKCoordinateRegionMakeWithDistance(CLLocationCoordinate2DMake(30.451667, -84.268533), 16090.344, 16090.344);
    viewRegion = [_map regionThatFits:viewRegion];
    [_map setRegion:viewRegion animated:YES];

    if (![self.slidingViewController.underLeftViewController isKindOfClass:[MenuViewController class]]) {
        self.slidingViewController.underLeftViewController  = [self.storyboard instantiateViewControllerWithIdentifier:@"Menu"];
    }

    if (![self.slidingViewController.underRightViewController isKindOfClass:[TimesViewController class]]) {
        self.slidingViewController.underRightViewController = [self.storyboard instantiateViewControllerWithIdentifier:@"Times"];
    }

    [self.view addGestureRecognizer:self.slidingViewController.panGesture];


}

- (void)loadBuilding:(Building *)building {
    if (buildingVC.buildingSelected) {
        if (buildAnnotation != nil) {
            [_map removeAnnotation:buildAnnotation];
        }
        NSLog(@"%@", building.getName);
        buildAnnotation = [[BuildingAnnotation alloc] initWithCoordinate:building.getLocation.coordinate withName:building.getName withAddress:building.getAddress];
        [_map setCenterCoordinate:buildAnnotation.coordinate animated:YES];
        [_map addAnnotation:buildAnnotation];
    }
}

- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration
{
  self.view.layer.shadowPath = nil;
  self.view.layer.shouldRasterize = YES;
}

- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
  self.view.layer.shadowPath = [UIBezierPath bezierPathWithRect:self.view.layer.bounds].CGPath;
  self.view.layer.shouldRasterize = NO;
}

- (IBAction)revealMenu:(id)sender
{
  [self.slidingViewController anchorTopViewTo:ECRight];
}

- (IBAction)revealTimes:(id)sender {
    [self.slidingViewController anchorTopViewTo:ECLeft];
}

@end

菜单视图控制器.h

#import <UIKit/UIKit.h>
#import "ECSlidingViewController.h"
#import "FirstTopViewController.h"
#import "TimesViewController.h"

@interface MenuViewController : UIViewController <UITableViewDataSource, UITabBarControllerDelegate> {
    NSIndexPath *selectedIndex;
}

@end

菜单视图控制器.m

#import "MenuViewController.h"

typedef enum {
    ENGINEERING,
    GARNET,
    GOLD,
    HERITAGE,
    NIGHT,
    OSCEOLA,
    RENEGADE,
    TOMAHAWK
} RouteName;


@interface MenuViewController()
@property (nonatomic, strong) NSArray *menuItems;
@property (nonatomic, strong) NSArray *optionItems;
@property (nonatomic, strong) NSArray *arrayItems;

- (UIImage *)determineActiveRoute:(RouteName)route;
@end

@implementation MenuViewController
@synthesize menuItems, optionItems, arrayItems;

- (void)awakeFromNib
{

    self.menuItems = [NSArray arrayWithObjects:@"Engineering", @"Garnet", @"Gold", @"Heritage Grove", @"Night Nole", @"Osceola", @"Renegade", @"Tomahawk", nil];
    self.optionItems = [NSArray arrayWithObjects:@"Buildings", @"Directions", nil];
    self.arrayItems = [NSArray arrayWithObjects:self.menuItems, self.optionItems, nil];
}

- (void)viewDidLoad
{
  [super viewDidLoad];
  [self.slidingViewController setAnchorRightRevealAmount:200.0f];
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)sectionIndex
{
  return [[self.arrayItems objectAtIndex:sectionIndex] count];
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return [self.arrayItems count];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
    return 35;
}

- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section {
    UIView *sectionView = [[UIView alloc] init];
    [sectionView sizeToFit];
    sectionView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"navCellDivider"]];
    UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 100, 20)];
    label.textColor = [UIColor grayColor];
    label.backgroundColor = [UIColor clearColor];
    label.font = [UIFont fontWithName:@"AGaramondPro-Regular" size:12.0];
    if(section == 0)
        label.text = @"BUS ROUTES";
    else
        label.text = @"OTHER OPTIONS";
    [sectionView addSubview:label];
    return sectionView;
}

- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
    return 20;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
{
    UILabel *label;
    UIImageView *imageView;
    NSString *cellIdentifier = @"MenuItemCell";
    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
    if (cell == nil) {
        cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];

    }
    UIView *selectedView = [[UIView alloc] initWithFrame:cell.frame];
    selectedView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"navCellBackgroundSelected"]];
    cell.selectedBackgroundView = selectedView;
    cell.contentView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"navCellBackground"]];
    label = (UILabel *)[cell.contentView viewWithTag:100];
    label.font = [UIFont fontWithName:@"AGaramondPro-Regular" size:15.0];
    label.text = [[self.arrayItems objectAtIndex:indexPath.section] objectAtIndex:indexPath.row];
    imageView = (UIImageView *)[cell.contentView viewWithTag:101];
    if (indexPath.section == 0) {
        [imageView setImage:[self determineActiveRoute:indexPath.row]];
    } else {
        if (indexPath.row == 0) {
            [imageView setImage:[UIImage imageNamed:@"building"]];
        } else {
            [imageView setImage:[UIImage imageNamed:@"60-signpost"]];
        }
    }

    return cell;
}

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    /* Type cast view as a First Top to make it easier to read. Do switch to select correct route,
        then modify map afterwards to load up correct route.
     TimesViewController can be set to the corresponding times when selected
     */
    FirstTopViewController *mapViewController = (FirstTopViewController *)self.slidingViewController.topViewController;
    TimesViewController *timesViewController = (TimesViewController *)self.slidingViewController.underRightViewController;

    if (indexPath.section == 0) {
        selectedIndex = indexPath;
        switch (indexPath.row) {
            case ENGINEERING:
                NSLog(@"Engineering Selected\n");
                timesViewController.times.text = @"Engineering";
                break;
            case GARNET:
                NSLog(@"Garnet Selected\n");
                timesViewController.times.text = @"Garnet";
                break;
            case GOLD:
                NSLog(@"Gold Selected\n");
                timesViewController.times.text = @"Gold";
                break;
            case HERITAGE:
                NSLog(@"Heritage Grove Selected\n");
                timesViewController.times.text = @"Heritage Grove";
                break;
            case NIGHT:
                NSLog(@"Night Nole Selected\n");
                timesViewController.times.text = @"Night Nole";
                break;
            case OSCEOLA:
                NSLog(@"Osceola Selected\n");
                timesViewController.times.text = @"Osceola";
                break;
            case RENEGADE:
                NSLog(@"Renegade Selected\n");
                timesViewController.times.text = @"Renegade";
                break;
            case TOMAHAWK:
                NSLog(@"Tomahawk Selected\n");
                timesViewController.times.text = @"Tomahawk";
                break;
            default:
                break;
        }
    } else {
        if (indexPath.row == 0) {
            BuildingViewController *buildings = [self.storyboard instantiateViewControllerWithIdentifier:@"BuildingList"];
            buildings.userLoc = [[CLLocation alloc] initWithLatitude:mapViewController.map.userLocation.coordinate.latitude longitude:mapViewController.map.userLocation.coordinate.longitude];

            [self presentModalViewController:buildings animated:YES];
        }
        [tableView deselectRowAtIndexPath:indexPath animated:NO];
        [tableView selectRowAtIndexPath:selectedIndex animated:YES scrollPosition:UITableViewScrollPositionNone];
    }
    [self.slidingViewController anchorTopViewTo:ECRight animations:nil onComplete:^{
        [self.slidingViewController resetTopView];
    }];
}

- (UIImage *)determineActiveRoute:(RouteName)route {
    NSCalendar *gregorianCalender = [[NSCalendar alloc] initWithCalendarIdentifier:NSGregorianCalendar];
    NSDateComponents *components = [gregorianCalender components:NSHourCalendarUnit fromDate:[NSDate date]];
    switch (route) {
        case ENGINEERING:
            if ([components day] % 7 == 2) {
                if (([components hour] >= 7) && ([components hour] < 17)) {
                    return [UIImage imageNamed:@"green"];
                } else {
                    return [UIImage imageNamed:@"red"];
                }
            } else if (([components day] % 7 == 3) || ([components day] % 7 == 4)) {
                return [UIImage imageNamed:@"red"];
            } else {
                //Weekday
                if (([components hour] >= 7) && ([components hour] < 19)) {
                    return [UIImage imageNamed:@"green"];
                } else {
                    return [UIImage imageNamed:@"red"];
                }
            }
            break;
        case GARNET:
        case GOLD:
        case HERITAGE:
            if ((([components day] % 7 <= 3) || ([components day] % 7 >= 5)) &&
                (([components hour] >= 7) && ([components hour] <= 19))) {
                return [UIImage imageNamed:@"green"];
            } else {
                return [UIImage imageNamed:@"red"];
            }
            break;
        case NIGHT:
            if ((([components day] % 7 == 6) || ([components day] % 7 <= 3)) &&
                (([components hour] >= 22.5) || ([components hour] <= 3))) {
                return [UIImage imageNamed:@"green"];
            } else {
                return [UIImage imageNamed:@"red"];
            }
            break;
        case OSCEOLA:
        case RENEGADE:
        case TOMAHAWK:
            if ((([components day] % 7 <= 3) || ([components day] % 7 >= 5)) &&
                (([components hour] >= 7) && ([components hour] <= 19))) {
                return [UIImage imageNamed:@"green"];
            } else {
                return [UIImage imageNamed:@"red"];
            }
            break;
    }
}

@end

检查您是否未将 .m 文件导入到应为 .h 文件的位置。哎哟!

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

iOS - 链接器错误、重复符号 的相关文章

  • 使用 NSDateFormatter 和 TimeZone(不带 GMT 时间修饰符)将 NSDate 转换为 NSString

    我正在初始化我的 NSDateFormatter NSDateFormatter dateFormatter NSDateFormatter alloc init autorelease dateFormatter setLocale NS
  • 是否可以对 UILabel 的文本颜色变化进行动画处理? [复制]

    这个问题在这里已经有答案了 UIView animateWithDuration 5 animations myLabel textColor UIColor redColor 标签文本颜色立即改变 Try this UIView tran
  • 如何设置 UINavigationbar 的渐变颜色?

    我想设置UINavigationbar backgroundColor渐变颜色 我想通过颜色数组设置它以创建渐变 理想情况下 作为内部的可访问方法UINavigationBar将其颜色更改为此渐变 有什么建议么 除了手动设置图像作为导航栏的
  • 在两个可移动 uiview 之间画线

    我有一个带有节点的 滚动视图 UIViews 可以拖动 我正在尝试在选定的之间绘制边缘UIViews使用 calayer 但我不知道当视图位置发生变化时如何重新绘制线条 In my viewControllerI 类在节点数组中添加第一个和
  • 如何在 iPad 应用程序上禁用横向方向?

    我创建了一个全新的单视图 iOS 通用 Swift 应用程序 然后 我在应用程序设置中取消选中 横向左 和 横向右 我在 iPhone 上运行了它 万岁 无论我如何旋转手机 它都会保持纵向模式 然后我在 iPad 上运行它 它会旋转到任何内
  • UINavigationBar 滑开而不是留在原处

    我创建了演示项目来展示问题 我们在 UINavigationController 中有两个视图控制器 MainViewController这是根 class MainViewController UIViewController lazy
  • 如何让位置音频在 SceneKit 中工作?

    我在使位置音频在 SceneKit 中工作时遇到问题 从 Xcode 生成的 SceneKit 游戏模板开始 我将以下代码添加到handleTap 方法的末尾 let ship scnView scene rootNode childNod
  • 使用基于 Cookie 的身份验证的 Capacitor iOS

    我正在使用 Capacitor v3 NextJS 静态导出和 Django 后端基于生产网站构建 iOS 应用程序 当前的后端身份验证方案通过 cookie 使用 Django 会话 并通过 cookie 设置 CSRF 令牌 应用程序可
  • iPhone 和 iPad 滚动结束

    我正在制作一些无限滚动的 jQuery 跨浏览器画廊 我工作得很好 但在 iPhone 上 我想也在 iPad 上 而不是相等的值 我有一些不成比例的值不匹配 window scrollTop document height window
  • 链接 .Net 程序集

    这都是假设 所以请耐心等待 假设我正在用 C 编写一个名为 Foo 的工具 输出是 foo exe 我发现了一些我喜欢使用的非常棒的库 称为 Bar 我可以在我的项目中将其引用为 bar dll 当我构建项目时 我的输出目录中有 foo e
  • 带有图像的 UITableView 滚动非常慢[重复]

    这个问题在这里已经有答案了 可能的重复 带图像的表格视图 加载和滚动缓慢 https stackoverflow com questions 4071497 table view with images slow load and scro
  • UIImageWriteToSavedPhotosAlbum 选择器语法问题

    努力让 UIImageWriteToSavedPhotosAlbum 快速工作https developer apple com library ios documentation UIKit Reference UIKitFunction
  • admob ios7错误音频框架

    我正在将 admob SDK 当前的 集成到我的上一个应用程序 IOS7 Xcode5 中 并且出现了一个新错误 在新项目上也是如此 我想我错过了一些东西 但我多次重新启动该过程 但错误仍然存 在 Undefined symbols for
  • Swift 错误:发出 SIGABRT 信号如何解决

    我只是 Swift 编码的初学者 我的想法很简单 就是一个有两个按钮的应用程序 单击时 文本字段将更改其文本 在 Main StoryBoard 中 我添加一个文本字段和两个按钮 在 ViewController swift 文件中 我这样
  • 如何将NSTextView的格式化内容转换为字符串

    我需要将 NSTextView 的内容从 Mac 应用程序传输到 iOS 应用程序 我使用 XML 作为传输文件格式 所以我需要将 NSTextView 的内容 文本 字体 颜色等 保存为字符串 有什么办法可以做到这一点吗 一种方法是存档
  • 播放循环声音的最简单方法是什么?

    在 iPhone 应用程序中播放循环声音的最简单方法是什么 可能最简单的解决方案是使用AVA音频播放器 http developer apple com library ios DOCUMENTATION AVFoundation Refe
  • 使用自定义格式将字符串转换为 NSDate [重复]

    这个问题在这里已经有答案了 可能的重复 NSString 到 NSDate https stackoverflow com questions 1353081 nsstring to nsdate iPhone 如何将 yyyyMMddTh
  • iOS 开发:如何强制 UIWebView 加载 Facebook 的非移动版本?

    我正在深入研究 iOS 开发 当我尝试在 UIWebView 中加载特定的 Facebook 粉丝页面时 它会加载该网站的移动版本 该版本仅加载粉丝页面的墙 而不是我需要加载的特定选项卡 在我的应用程序的 iPad 版本中 UIWebVie
  • iOS 11 中的密码自动填充快速输入栏

    iOS 11 中引入了一项新功能 应用程序密码自动填充 此功能允许用户直接从键盘快速输入栏使用其应用程序中保存的密码 https techcrunch com 2017 06 08 ios 11s new password autofill
  • Swift:UICollectionViewCell didSelectItemAtIndexPath 更改背景颜色

    我可以轻松更改单元格的背景颜色CellForItemAtIndexPath method func collectionView collectionView UICollectionView cellForItemAtIndexPath

随机推荐

  • 在 Websphere Portal 8 中以编程方式显式注销用户并重定向到默认登录页面

    我对 WS 门户有点陌生 并且有一个要求 其中在特定场景中我们希望用户注销并将其重定向到默认门户登录页面 我已经尝试过使会话无效清除cookies并执行response sendRedirect 如下所示响应 sendRedirect wp
  • 当用户在 Chromium 中打开新选项卡时运行指定的函数

    我想从 Chromium 的 新标签 页面中删除访问量最大的缩略图 检查该页面的内容后 我确定以下 JavaScript 行可以解决问题 document getElementById most visited remove 但我仍然有一个
  • 获取 std::wstring 的子字符串

    我怎样才能得到a的子串std wstring其中包含一些非 ASCII 字符 以下代码不会输出任何内容 文本是一个阿拉伯单词 包含 4 个字符 每个字符有两个字节 加上单词 Hello include
  • 为什么堆栈跟踪行号与源代码行号不匹配?

    我的应用程序因设备上的 NPE 崩溃 在 ACRA 收到的堆栈跟踪中 行号指的是两个源代码类 SQLiteStatement and SQLiteDatabase For SQLiteDatabase 没有任何行号与任何源代码版本中的行号匹
  • Log4j2 与 apache Ivy 依赖管理无法解析 log4j-api-java9

    当尝试将 apache log4j2 与 ivy 构建管理工具一起使用时 在尝试解决依赖项时出现以下错误 problems summary WARNINGS module not found org apache logging log4j
  • 检索 POJO 外部容器中的 servlet 上下文、会话和请求

    有没有办法从 POJO 检索会话 或者最终从 POJO 中检索 bean 澄清 基本上 我从 servlet 创建一个 bean 并且需要从 Web 容器外部 从 POJO 访问该 bean 的属性 我无法将请求传递给 pojo 并且需要请
  • matplotlib:如何刷新figure.canvas

    我不明白如何刷新FigureCanvasWxAgg 实例 这是示例 import wx import matplotlib from matplotlib backends backend wxagg import FigureCanvas
  • 根据 Windows 主题更改面板的主题(颜色)

    我想根据当前选择的 Windows 主题更改面板的颜色 我已经设置了道具 EnableVisStyles 它改变了工具栏和 Windows 窗体的标题栏等内容 但面板颜色保持不变 有什么办法可以实现这一点吗 问候 严酷的苏曼 您可能已经设置
  • 在 C# 中将委托转换为通用委托

    介绍 我使用委托来传递和存储单个表单的样式逻辑Controls 例如 我有一个委托 其中包含一些Button 样式逻辑如下 button BackColor Color Red button ForeColor Color White bu
  • 在 C 中创建字符串数组

    我想创建一个包含 N 个位置的数组 在每个位置 我想存储一个10个字符的字符串 这就是我尝试过的 在给出的示例中 N 15 但是这个数字可以改变 char userArray 10 malloc sizeof char 10 15 编译 i
  • ImageMagick 缺少解码委托

    我最近搬到 MediaTemple 并按照他们的知识库文章安装了 ImageMagick 和 IMagickhere http kb mediatemple net questions 1778 Is ImageMagick install
  • “无法在任何存储库中找到有效的 gem”(rubygame 等)

    我尝试安装这个 rubygame gem有一段时间了 但是每当我使用该命令时 gem install rubygame 它会给出一个错误 ERROR Could not find a valid gem rubygame gt 0 in a
  • 等待执行器中的所有线程完成?

    我正在实现并行快速排序作为编程实践 完成后 我阅读了 Executors 上的 Java 教程页面 这听起来像是它们可以使我的代码更快 不幸的是 我依靠 join 来确保程序在所有内容都排序完成之前不会继续 现在我正在使用 public s
  • 如何防止 grep 打印尾随换行符?

    我在用grep产生将由另一个程序解析的输出 但是 该程序期望输出仅为数字或零字节 Now grep在输出后输出一个换行符 我已经检查过 Z选项 但它似乎不起作用 因为我正在使用 grep 进行计数 c 我正在执行sh not bash 所以
  • 如何使用 JavaScript/jQuery 将新数据发布到 CouchDB

    我找到了答案here https stackoverflow com questions 2099728 how do i send an ajax request on a different port with jquery对于下面的问
  • C语言中为什么会有NULL?

    为什么有一个NULL在C语言中 是否有一个上下文 其中只是简单的文字0会不会工作完全一样 实际上 你可以使用文字0任何你会使用的地方NULL 第 6 3 2 3p3 节C标准 http www open std org jtc1 sc22
  • Flutter:从其他页面访问存储的 Sharedpreference 值

    我正在一个名为的页面中存储一个值page1 dart 我想访问存储的值page2 dart or page3 dart 我怎样才能实现这个目标 Flutter 共享首选项实际上是作为内存缓存实现的 你第一次打电话的时候SharedPrefe
  • 使用 OpenCV 时 Apple Mach-O 链接器和多个“未定义符号”错误

    我目前是 Objective C 的真正初学者 我正在使用 OpenCV 框架开发一个应用程序 我正在遵循教程 但是在构建项目时 我遇到了几个错误 Undefined symbols for architecture i386 std 1
  • 获取 Android 上的所有总空间和可用空间

    据我所知 Android 上有 应用程序和缓存的内部存储器 某些手机 上的内置 SD 卡 不可拆卸 用于存储音乐和照片的外部 SD 卡 可拆卸 如何通过检查它们是否存在来获取每个手机的总数和可用数量 某些手机没有内部 SD 卡 Thanks
  • iOS - 链接器错误、重复符号

    似乎我在尝试编译时遇到错误 它似乎直接指向两个文件 MenuViewController 和 FirstTopViewController 我认为这与我的导入有关 因为它们每个都在导入另一个 但是错误引用了我的 Building 对象 该对