鸡毛蒜皮集锦

来源:互联网 发布:kvm虚拟机windows 编辑:程序博客网 时间:2024/04/29 12:00

打算纪录一下各种鸡毛蒜皮的小错误,过段时间回头看看有没有用


1. MAC篇

MAC OX 10.8.2 ML, Xcode Xcode 4.5.1 (Build version 4G1004)

1.1 undefined symbols for architecture x86_64:  "_omp_get_thread_num", referenced from:....

Solution: -fopenmp option both enables parsing of OpenMP pragmas at compile time and linking with libgompOpenMP run-time library (and also with libpthreads) at link time. 

http://stackoverflow.com/questions/12500859/openmp-mac-osx-lion-c-linker-error-undefined-symbols-for-architecture-x86-64


1.2 ld: can't open output file for writing: xxxx, errno=21 for architecture x86_64

R&S: 有个和输出文件xxxx同名的文件夹!!(不区分大小写)

Error 21 in /usr/include/sys/errno.h is EISDIR 

http://stackoverflow.com/questions/9200521/why-does-the-name-of-a-source-file-affect-compilation


1.3 编译opencv下的kalman例子出错:ld: can't write output file: kalman for architecture x86_64

R&S:都说了没权限嘛。。。如果一定要在安装目录下生成(/opt/local/share/OpenCV/samples/cpp/)就sudo就好了

这里https://discussions.apple.com/thread/3406578?start=0&tstart=0 说还要

sudo bash

export ARCHFLAGS='-arch i386 -arch x86_64'

没必要