用于Xcode 4.x的CS106B libs 有一个Stanford C++库的版本,用于CS106B,可与XCODE 4。x使用。 iTunes U视频大约有4年历史,讲义中提到的LIB与Xcode 4.x@10.7.3不兼容

用于Xcode 4.x的CS106B libs 有一个Stanford C++库的版本,用于CS106B,可与XCODE 4。x使用。 iTunes U视频大约有4年历史,讲义中提到的LIB与Xcode 4.x@10.7.3不兼容,c++,C++,我已经尝试安装Xcode 3,但它在启动时崩溃,所以这不是一个选项 也许有一些等效的lib提供类似的功能 有什么建议吗 讲座和材料可在以下位置获得: LIB可在以下位置获得: 我也有同样的问题。解决这个问题的方法不是下载旧的XCode(会崩溃)或斯坦福库的新版本(不存在)——首选方法是使用新的分配文件(每个文件都附带必需的库文件)并通过打开每个文件夹中的XCode项目文件,直接在XCode 4中打开这些文件夹。您可以在当前课程网站中找到这些文件: 不幸的是,您无法直接获取这种格式的旧分配文

我已经尝试安装Xcode 3,但它在启动时崩溃,所以这不是一个选项

也许有一些等效的lib提供类似的功能

有什么建议吗

讲座和材料可在以下位置获得:

LIB可在以下位置获得:


我也有同样的问题。解决这个问题的方法不是下载旧的XCode(会崩溃)或斯坦福库的新版本(不存在)——首选方法是使用新的分配文件(每个文件都附带必需的库文件)并通过打开每个文件夹中的XCode项目文件,直接在XCode 4中打开这些文件夹。您可以在当前课程网站中找到这些文件:


不幸的是,您无法直接获取这种格式的旧分配文件。这样,你就可以1)跟随新的练习在当前的班级网站上,或者2)使用空白的项目文件夹并且稍稍跟随旧的任务。

< P>最简单的方法是去CS106B的网站下载一个作业。从这里你可以得到斯坦福图书馆的标题。继续并尝试将这些库加载到Xcode中几乎是徒劳的。这样容易多了。

-链接到斯坦福德的网站,在那里你可以找到作业

非斯坦福学生CS106B材料的新链接:

我正在使用来自和库的最新可用106b作业。这些库将与2014年出版的书一起使用(您也可以将其与书的源代码一起使用)。然后我编译了库(只需将cd转换成main dir并在命令行上使用make),并使用file
lib/libStanfordCPPLib.a
而不是在作业中提供的(我使用的是OS X 10.11,上一次作业的版本是10.8)。这似乎有效。

我投票决定关闭,因为太本地化了。如果图书馆是课程的一部分,我认为除了其他学生或助教之外,没有人能在这方面帮助你。如果它们是公开的,那么你至少应该添加一个链接。在任何情况下,您都应该添加在尝试使用时出现的错误。还要注意,如果它们是不兼容的,很可能是由于编译器/ LIBs而不是IDE的改变,您可能需要考虑安装旧的编译程序。链接器错误看起来像是想要链接Objto-C而不是普通C++,另一个原因是LIB似乎依赖于一个不存在或已经改变的库。第一个链接器错误看起来更像是系统库(OSX版本)的问题,而不是IDE的问题。
#include "genlib.h"
#include "simpio.h"
#include <iostream>


int main(int argc, const char * argv[])
{
    // insert code here...
    std::cout << "Hello, World!\n";
    return 0;
}
Ld /Users/user123/Library/Developer/Xcode/DerivedData/helloworld-ahlmhegbtmaasucxmbtekzjtbuha/Build/Products/Debug/helloworld normal i386
    cd "/Users/user123/Dropbox/$workspaces/Xcode/CS106B/helloworld"
    setenv MACOSX_DEPLOYMENT_TARGET 10.7
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk -L/Users/user123/Library/Developer/Xcode/DerivedData/helloworld-ahlmhegbtmaasucxmbtekzjtbuha/Build/Products/Debug "-L/Users/user123/Dropbox/$workspaces/Xcode/CS106B/helloworld/cs106" "-L/Users/user123/Dropbox/$workspaces/Xcode/CS106B/helloworld/StanfordCPPLib" "-L/Users/user123/Dropbox/$workspaces/Xcode/CS106B/helloworld/helloworld/cs106" -F/Users/user123/Library/Developer/Xcode/DerivedData/helloworld-ahlmhegbtmaasucxmbtekzjtbuha/Build/Products/Debug -filelist /Users/user123/Library/Developer/Xcode/DerivedData/helloworld-ahlmhegbtmaasucxmbtekzjtbuha/Build/Intermediates/helloworld.build/Debug/helloworld.build/Objects-normal/i386/helloworld.LinkFileList -mmacosx-version-min=10.7 -lcs106 -o /Users/user123/Library/Developer/Xcode/DerivedData/helloworld-ahlmhegbtmaasucxmbtekzjtbuha/Build/Products/Debug/helloworld

Undefined symbols for architecture i386:
  "___CFConstantStringClassReference", referenced from:
      CFString in libcs106.a(mainwrapper.o)
      CFString in libcs106.a(mainwrapper.o)
      CFString in libcs106.a(mainwrapper.o)
      CFString in libcs106.a(mainwrapper.o)
      CFString in libcs106.a(mainwrapper.o)
      CFString in libcs106.a(mainwrapper.o)
      CFString in libcs106.a(mainwrapper.o)
      ...
  "_NSApp", referenced from:
      +[Glue showAbout:] in libcs106.a(mainwrapper.o)
      TerminateApp() in libcs106.a(mainwrapper.o)
      +[NSBundleWithoutSpuriousErrorLog aloadNibNamed:owner:] in libcs106.a(mainwrapper.o)
      _main in libcs106.a(mainwrapper.o)
      -[ConsoleTextView keyDown:] in libcs106.a(ConsoleTextView.o)
      +[Glue showAbout:] in libcs106.a(mainwrapper.o)
      TerminateApp() in libcs106.a(mainwrapper.o)
      +[NSBundleWithoutSpuriousErrorLog aloadNibNamed:owner:] in libcs106.a(mainwrapper.o)
      _main in libcs106.a(mainwrapper.o)
      -[ConsoleTextView keyDown:] in libcs106.a(ConsoleTextView.o)
  "_objc_msgSendSuper", referenced from:
      +[NSBundleWithoutSpuriousErrorLog aloadNibNamed:owner:] in libcs106.a(mainwrapper.o)
      -[ConsoleTextView initWithFrame:] in libcs106.a(ConsoleTextView.o)
      -[ConsoleTextView setFont:] in libcs106.a(ConsoleTextView.o)
      -[ConsoleTextView dealloc] in libcs106.a(ConsoleTextView.o)
      -[ConsoleTextView keyDown:] in libcs106.a(ConsoleTextView.o)
      -[ConsoleTextView rangeForUserTextChange] in libcs106.a(ConsoleTextView.o)
  "_CFBundleGetInfoDictionary", referenced from:
      _main in libcs106.a(mainwrapper.o)
  "_CFBundleCopyBundleURL", referenced from:
      _main in libcs106.a(mainwrapper.o)
  "_objc_msgSend", referenced from:
      +[Glue applicationDidFinishLaunching:] in libcs106.a(mainwrapper.o)
      +[Glue showAbout:] in libcs106.a(mainwrapper.o)
      CocoaConsoleResize(int, int, int, int) in libcs106.a(mainwrapper.o)
      TerminateApp() in libcs106.a(mainwrapper.o)
      SetConsoleSize(int, int, int, bool) in libcs106.a(mainwrapper.o)
      patched_read(void*, char*, int) in libcs106.a(mainwrapper.o)
      CreateMenuWithItems(NSString*, menuitem*, int) in libcs106.a(mainwrapper.o)
      ...
  "_CFURLCreateCopyDeletingLastPathComponent", referenced from:
      _main in libcs106.a(mainwrapper.o)
  "_CFURLGetFileSystemRepresentation", referenced from:
      _main in libcs106.a(mainwrapper.o)
  "_CFBundleGetMainBundle", referenced from:
      _main in libcs106.a(mainwrapper.o)
  "Main()", referenced from:
      +[Glue studentMain] in libcs106.a(mainwrapper.o)
  "_CFRelease", referenced from:
      _main in libcs106.a(mainwrapper.o)
  "_NSFileHandleDataAvailableNotification", referenced from:
      -[ConsoleTextView registerForNotifications] in libcs106.a(ConsoleTextView.o)
  "_NSForegroundColorAttributeName", referenced from:
      -[ConsoleTextView setFont:] in libcs106.a(ConsoleTextView.o)
  "_NSFontAttributeName", referenced from:
      -[ConsoleTextView setFont:] in libcs106.a(ConsoleTextView.o)
      +[ConsoleTextView contentSizeForPointSize:numRows:numCols:] in libcs106.a(ConsoleTextView.o)
  "_NSBeep", referenced from:
      -[ConsoleTextView keyDown:] in libcs106.a(ConsoleTextView.o)
  "_objc_msgSend_fpret", referenced from:
      +[ConsoleTextView contentSizeForPointSize:numRows:numCols:] in libcs106.a(ConsoleTextView.o)
  "_objc_msgSend_stret", referenced from:
      -[ConsoleTextView setPointSize:numRows:numCols:center:] in libcs106.a(ConsoleTextView.o)
      +[ConsoleTextView contentSizeForPointSize:numRows:numCols:] in libcs106.a(ConsoleTextView.o)
      +[ConsoleTextView createConsoleInWindow] in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSThread", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSAutoreleasePool", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSDictionary", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSString", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSMenu", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSMenuItem", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSBundle", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
      .objc_class_name_NSBundleWithoutSpuriousErrorLog in libcs106.a(mainwrapper.o)
     (maybe you meant: .objc_class_name_NSBundleWithoutSpuriousErrorLog)
  ".objc_class_name_NSApplication", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSObject", referenced from:
      .objc_class_name_Glue in libcs106.a(mainwrapper.o)
  ".objc_class_name_NSAttributedString", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSMutableDictionary", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSFont", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSScroller", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSScreen", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSWindow", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSScrollView", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSColor", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSNotificationCenter", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSFileHandle", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSData", referenced from:
      pointer-to-literal-objc-class-name in libcs106.a(ConsoleTextView.o)
  ".objc_class_name_NSTextView", referenced from:
      .objc_class_name_ConsoleTextView in libcs106.a(ConsoleTextView.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)