我很困扰,因为这不应该让我头疼.我已经下载了最新的Eclipse Indigo以及适用于MAC OS X 10.7.1的所有 CDT C++插件
在安装上述CDT插件后重新启动时,我开发了一个简单的"hello world"c ++应用程序,并尝试运行该应用程序,"启动失败.未找到二进制文件." 错误信息.我已阅读多个修复程序,但没有一个有效.我尝试将-arch i386标志添加到链接器和编译器命令,但仍然没有运气.
有没有人成功地在10.7.1上运行Eclipse C++ ?????? 这让我大吃一惊.我可以简单地在VIM中编写相同的程序,并通过终端编译得很好并执行得很好.ECLIPSE不想玩.
我将深深感激任何可以提供帮助的人!!!!!
编辑:编译器输出
**** Build of configuration Debug for project HelloWorld ****
make all Building file: ../main.cpp
Invoking: GCC C++ Compiler g++ -I/Developer/SDKs/MacOSX10.6.sdk/usr/include -O0 -g3 -Wall -c -fmessage-length=0 -arch i386 -MMD -MP -MF"main.d" -MT"main.d" -o "main.o" "../main.cpp"
Finished building: ../main.cpp
Building target: libHelloWorld
Invoking: MacOS X C++ Linker g++ -arch i386 -dynamiclib -o "libHelloWorld" ./main.o
Finished building target: libHelloWorld
**** Build Finished ****
Run Code Online (Sandbox Code Playgroud) 我正在尝试使用Tomcat 7.0.22中的管理器应用程序登录Mac OS X 10.7.这是我得到的错误:http://f.cl.ly/items/421q1K3f1i0X1H1M181v/so.tiff
401 Unauthorized
You are not authorized to view this page. If you have not changed any configuration files, please examine the file conf/tomcat-users.xml in your installation. That file must contain the credentials to let you use this webapp.
For example, to add the manager-gui role to a user named tomcat with a password of s3cret, add the following to the config file listed above.
<role rolename="manager-gui"/>
<user username="tomcat" password="s3cret" roles="manager-gui"/>
Run Code Online (Sandbox Code Playgroud)
我已经在我的tomcat-users.xml中添加了这个,仍然没有使用相同的用户名/密码.
<tomcat-users> …Run Code Online (Sandbox Code Playgroud) 我正在尝试编译一个使用新英特尔处理器中存在的pclmulqdq指令的程序.我已经使用macports安装了GCC 4.6但是当我编译我的程序(使用内在的_mm_clmulepi64_si128)时,我得到了
/var/folders/ps/sfjmtgx5771_qbqnh4c9xclr0000gn/T//ccEAWWhd.s:16:no such
instruction: `pclmulqdq $0, %xmm0,%xmm1'
Run Code Online (Sandbox Code Playgroud)
似乎GCC能够从instrinsic生成正确的汇编代码,但汇编程序无法识别该指令.
我已经使用macports安装了binutils,但问题仍然存在.我怎么知道哪个汇编程序gcc正在使用?XCode汇编程序可能不支持它,但binutils汇编程序应该.
我的应用程序包含一个NSScrollView文档视图,其中包含一些垂直堆叠的文件NSTextViews- 每个文本视图在添加文本时都会在垂直方向上调整大小.
目前,这都是在代码中管理的.该NSTextViews自动调整,但我观察他们调整大小有NSViewFrameDidChangeNotification,重计算其所有来源,使他们不重叠,并调整其上海华盈(滚动视图的文档视图),使它们都适合和可滚动到.
这似乎是自动布局的完美候选人!我NSLayoutConstraints在第一个文本视图和它的容器,最后一个文本视图及其容器之间设置,以及彼此之间的每个文本视图.然后,如果任何文本视图增长,它会自动"按下"它下面的文本视图的来源以满足约束,最终增加文档视图的大小,每个人都很高兴!
除此之外,似乎没有办法NSTextView在基于约束的布局中添加文本时自动增长?使用与NSTextView之前输入的文本自动扩展完全相同的内容,如果我没有为其高度指定约束,则将其自动解析为0并且不显示.如果我确实指定了约束,即使是不等式(例如> = 20),它仍然会停留在该大小,并且不会随着文本的添加而增长.
我怀疑这与NSTextView的实现有关-intrinsicContentSize,默认情况下会返回(NSViewNoInstrinsicMetric, NSViewNoInstrinsicMetric).
所以我的问题是:如果我根据我的文本布局NSTextView返回更有意义intrinsicContentSize的子类,那么我的自动布局会按预期工作吗?
关于实现intrinsicContentSize垂直调整大小NSTextView的任何指针?
首先,是的,我知道有很多类似于这个问题的主题,我确实在堆栈溢出时使用了搜索功能.
但是提出的大部分问题似乎都是关于长启动时间.
对我来说,模拟器是如此之慢,只需从一个主屏幕滑动到另一个主屏幕就像观看幻灯片一样.我将更多"RAM"放入虚拟设备但没有任何变化.
我该如何解决?
我在Mac OS X Lion上使用Macbook Pro 2010.
我正在尝试让内联包在我的macbook上运行.以下代码块(来自cxxfunction示例)失败:
library(inline)
fx <- cxxfunction( signature(x = "integer", y = "numeric" ) , '
return ScalarReal( INTEGER(x)[0] * REAL(y)[0] ) ;
' )
fx( 2L, 5 )
Run Code Online (Sandbox Code Playgroud)
出现此错误:
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! make: g++-4.2: No such file or directory
make: *** [file141b5882.o] Error 1
Run Code Online (Sandbox Code Playgroud)
这很奇怪,因为g ++可用:
g++ -v
Using built-in specs.
Target: i686-apple-darwin11
Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/src/configure --disable-checking --enable-werror --prefix=/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.1~22/dst-llvmCore/Developer/usr/local …Run Code Online (Sandbox Code Playgroud) 我试图在Mac OS X Lion的终端中设置MySQL的root密码,我遇到了问题.每次我使用该行:
/usr/local/mysql/bin/mysqladmin -u root password ****** (where ****** is the password I want to set)
Run Code Online (Sandbox Code Playgroud)
我收到错误:
/usr/local/mysql/bin/mysqladmin: connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'
Run Code Online (Sandbox Code Playgroud)
我以前没有设置密码,所以我不知道为什么我收到此错误.
我跟随ruby on rails教程运行postgres但是当我尝试"rake db:create"时,我收到以下错误:
could not connect to server: Permission denied
Is the server running locally and accepting
connections on Unix domain socket "/var/pgsql_socket/.s.PGSQL.5432"?
Run Code Online (Sandbox Code Playgroud)
我发现这个问题发出了一些类似的问题,但无论如何我都无法使它工作.
我在阅读完这个问题后安装了自制软件,路径很好,brew医生告诉我路径上没有错误.
我实际上已经有这个问题了一段时间,但我终于决定接受它.Postgres最初是使用Brew安装的.
我升级到OSX 10.8.2后收到一个
psql: could not connect to server: No such file or directory
Is the server running locally and accepting
connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
Run Code Online (Sandbox Code Playgroud)
键入时出错
$ psql
Run Code Online (Sandbox Code Playgroud)
命令.
我看到以下过程:
$ ps auxw | grep post
Tulsa 59222 0.0 0.2 2483256 14808 ?? Ss Thu03PM 0:02.61 /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper -uuid 470DA5CC-1602-4D69-855F-F365A6512F90 -post-exec 4
Tulsa 57940 0.0 0.2 2498852 13648 ?? Ss Wed10PM 0:00.61 /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper -uuid FAFAAAB4-0F67-42C8-864E-EF8C31A42EE3 -post-exec 4
root 24447 0.0 0.1 2476468 10080 ?? Ss 8Feb13 0:03.40 /System/Library/PrivateFrameworks/DiskImages.framework/Resources/diskimages-helper -uuid …Run Code Online (Sandbox Code Playgroud) 我一直在寻找这个问题的答案,但我找不到它,所以在这里.
我正在尝试使用以下命令将带有setup.py文件的Uniconvertor安装到MacOS X Lion(Python 2.7.2)中:
python setup.py install
Run Code Online (Sandbox Code Playgroud)
然后我得到以下错误代码:
running install
running build
running build_py
running build_ext
building 'uniconvertor.app.modules.streamfilter' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -isysroot /Developer/SDKs/MacOSX10.6.sdk -g -O2 -DNDEBUG -g -O3 -arch i386 -arch x86_64 -DMAJOR_VERSION=1 -DMINOR_VERSION=1 -I/Library/Frameworks/Python.framework/Versions/2.7/include/python2.7 -c src/modules/filter/streamfilter.c -o build/temp.macosx-10.6-intel-2.7/src/modules/filter/streamfilter.o
unable to execute gcc-4.2: No such file or directory
error: command 'gcc-4.2' failed with exit status 1
Run Code Online (Sandbox Code Playgroud)
我在Developer/usr/bin文件夹中查找了'gcc-4.2'文件但它不存在,但是有一个'llvm-gcc.4.2'文件让我觉得我应该从'gcc-4.2更改编译器'到'llvm-gcc.4.2'一个.
我是Mac的新手,我不知道如何修复它.
谢谢.
编辑:
我试过用:
cd /Developer/usr/bin
ln -s llvm-gcc-4.2 gcc-4.2
Run Code Online (Sandbox Code Playgroud)
我得到了更多进步,但随后出现了一个新错误:
running install_lib
creating /Library/Python/2.7/site-packages/uniconvertor
error: could not …Run Code Online (Sandbox Code Playgroud) osx-lion ×10
macos ×3
postgresql ×2
android ×1
assembly ×1
autolayout ×1
avx ×1
c++ ×1
cocoa ×1
eclipse ×1
eclipse-cdt ×1
gcc ×1
gcc-4.2 ×1
inline ×1
macports ×1
manager-app ×1
mysql ×1
nstextview ×1
python ×1
python-2.7 ×1
r ×1
rcpp ×1
terminal ×1
tomcat7 ×1
xcode ×1