osx-lion

glewInit() fails on macOS

孤街醉人 提交于 2019-11-30 21:18:58
So I have a piece of code that runs fine on ubuntu machine, but fails to do so on xcode or via terminal. I'm trying to run it on xcode, but it fails on main with: "Use of undeclared identifier glewInit; did you mean glutInit?" "Too few argument to function call, expected 2, have 0" The code is lengthy is been written by my professor and it runs on ubuntus. But with the errors, I'm thinking that the reasons is...well, underclared identifier, include is missing. So, after googling I figured out that glewInit is part of the glew library -> so I downloaded the code and installed it on my machine

Install pyUSB 0.4.3 on OSX Lion 10.7.3

倖福魔咒の 提交于 2019-11-30 20:27:30
问题 I'm trying to install pyusb 0.4.3 on Mac OS X Lion 10.7.3 running Xcode 4.3 (the new Mac App Store .app with command line tools installed). When I try to "python setup.py install" I get this long list of error ending with "error: command 'llvm-gcc-4.2' failed with exit status 1": http://pastebin.com/R8id7Qf7 pyUSB 1.0alpha2 installs fine. Any ideas? I'm a bit of Unix noob so please explain accordingly. Thanks 回答1: It looks like you don't have libusb installed. Try here: http://www.anyma.ch

OSX 10.7.5 + OpenCV 2.4.3: “Undefined symbols for architecture x86_64” when using “cv::SimpleBlobDetector”

a 夏天 提交于 2019-11-30 19:14:24
问题 I'd like to play around with OpenCVs cv::SimpleBlobDetector, but when compiling my code I get the following error: Ld /Users/dom/Library/Developer/Xcode/DerivedData/blob-test-opencv-dgtflkyexnsjekbwuxnuoisqknux/Build/Products/Debug/blob-test-opencv.app/Contents/MacOS/blob-test-opencv normal x86_64 cd /Users/dom/Desktop/blob-test-opencv setenv MACOSX_DEPLOYMENT_TARGET 10.7 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ \ -arch x86_64 \ -isysroot

Mac OS: How to draw graph in Mac OS application?

偶尔善良 提交于 2019-11-30 18:53:31
问题 I am developing a Mac OS X application. In that i have to draw a wave graph / chart. Is there any library / framework available which makes my job easy? What is the best way of achieving this goal? Thanks in advance. 回答1: Core Plot is a plotting framework for iOS and OS X. I'm not sure if it'll have the exact type of graph you want but it is probably your best bet. If a web-based API is acceptable then you could look at the Wolfram Alpha API (as @estro suggests) or perhaps the Google Chart

C - Undefined symbols for architecture x86_64 when compiling on Mac OSX Lion

浪尽此生 提交于 2019-11-30 18:19:59
I'm getting some problems on compiling a very very simple name.c file on Mac OSX Lion. Now, I started following Harvard CS50 course on cs50.net. I'm not totally new to programming but I was curious on how this course has been taught. This is the source of name.c: #include <stdio.h> #include <cs50.h> int main(void) { printf("State your name:\n"); string name = GetString(); printf("O hai, %s!\n", name); return 0; } As you can see, it requires this library: https://manual.cs50.net/CS50_Library . Now, when I compile it, this happens: Undefined symbols for architecture x86_64: "_GetString",

How to know if a NSWindow is fullscreen in Mac OS X Lion?

早过忘川 提交于 2019-11-30 17:31:05
I guess I should check if [NSApplication presentationOptions] contains NSFullScreenModeApplicationPresentationOptions , but how do I achieve that? EDIT: using [NSApplication presentationOptions] doesn't work as in my document-based app there might be some documents in fullscreen and others not. I'm now looking for another solution. I'm wondering why there isn't a property called [NSWindow isFullscreen] or something like that. I was just looking for a solution myself and based on Matthieu's answer I created a category on NSWindow that works fine for me. @interface NSWindow (FullScreen) - (BOOL

Mac OS X Lion: What is the max path length?

十年热恋 提交于 2019-11-30 17:28:39
I am having trouble finding this information, and trial and error is telling me that the value is very high. So I figured I ask the community to see if anyone knows and can point me to a apple page that confirms the length for Lion. All I know is it is larger that Snow Leopard. The limits depend on the used filesystem - OSX uses HFS Plus by default... The only official documents I can point to are the HFS Plus spec which document the limit of 255 for filename length. Wikipedia hints that the max path length on HFS Plus is "unlimited". Perhaps contacting Apple Dev support is the most reliable

32-bit OpenCV on OS X Lion? Possible?

半腔热情 提交于 2019-11-30 16:04:57
问题 I've been googling and trying for days now, trying to figure out how to get 32-bit OpenCV working on OS X Lion, but can just find 64-bit version. So i have the following questions: OpenCV libraries come in 32-bit or 64-bit arch, is that correct? How do I get 32-bit OpenCV working on Lion? I've trying the following ways: - Install OpenCV via MacPorts: nope, MacPorts installs a 64-bit version.BI removed OpenCV and MacPorts. Install OpenCV 2.4.1 via Homebrew, using the following command: brew

How to remove XCode 4.2 and install 4.1 to develop Ruby / Rails on OSX Lion?

我怕爱的太早我们不能终老 提交于 2019-11-30 15:54:32
问题 I develop Rails apps using RVM (ruby version manager). I had to download XCode, in the app store I got only version 4.2. Now RVM says that it can't build rubies properly with this XCode, so I followed this tutorial: http://www.frederico-araujo.com/2011/07/30/installing-rails-on-os-x-lion-with-homebrew-rvm-and-mysql/ I downloaded the XCode version from the link that is shown when you type rvm requirements in the console. (https://developer.apple.com/downloads/download.action?path=Developer

How do I get git to use Textmate as my default editor?

天大地大妈咪最大 提交于 2019-11-30 15:52:16
问题 At the command-line, if I do mate <filepath> it opens up the right file for me in TextMate. But when I do: $ mate -v open: invalid option -- v Usage: open [-e] [-t] [-f] [-W] [-R] [-n] [-g] [-h] [-b <bundle identifier>] [-a <application>] [filenames] [--args arguments] Also, when I do git commit , I see this: $ git commit error: cannot run mate: No such file or directory error: There was a problem with the editor 'mate'. Please supply the message using either -m or -F option. My ~/