cannot open imagefile "libgsl.a"

I use Xcode2 on Mac OS X 10.4, and program c++ with GSL library.
The GSL header files are in /opt/local/include/gsl/gsl_xxx.h
I also edit the settings of &Header Search Path& to be /opt/local/include
# include &gsl/gsl_xxx.h&
in my program.
But Xcode2 still cannot locate the file.
I am very sure the file is there and I didn't type it wrong. Sometimes Xcode2 can find it and build my program successfully, sometimes not. Looks completely random.
I am so tired of Xcode2. Can someone save me?Click to expand...
Try putting a trailing &/& at the end of /opt/local/include in the header search path. It sounds stupid, I know, but I've had this issue with gcc compiler flags in my makefiles before.
I use Xcode2 on Mac OS X 10.4, and program c++ with GSL library.
The GSL header files are in /opt/local/include/gsl/gsl_xxx.h
I also edit the settings of &Header Search Path& to be /opt/local/include
# include &gsl/gsl_xxx.h&
in my program.
But Xcode2 still cannot locate the file.
I am very sure the file is there and I didn't type it wrong. Sometimes Xcode2 can find it and build my program successfully, sometimes not. Looks completely random.
I am so tired of Xcode2. Can someone save me?Click to expand...
XCode 3 has been out for ages.
&these quotes& are for system header files.
&these quotes& are for user header files.
There is probably an option to use the header search path for all include files.
The usual method to get this working is to start with something that works and modify it until you get what you want. Remember that 99% of the time it is some stupid mistake or something you don't understand that keeps it from working.
XCode 3 has been out for ages.Click to expand...
He's still on 10.4, and Xcode 3 requires 10.5.
Can it be true that there are no
experts out there willing to help with this issue? Click to expand...
You'll probably need some basic debugging techniques.
Fact: You think it should work, but it doesn't work. So something is wrong somewhere. Most likely something you did, because otherwise there would be more people complaining. All you need to find is: What is wrong?
Start with something that works, then change it until it breaks, and find out why.
Start by including the full path:
#include &/opt/local/include/libxml++-1.0/libxml++/libxml++.h&.
If that doesn't work: Start terminal, type
ls /opt/local/include/libxml++-1.0/libxml++
That should list the files in the directory. If libxml++.h isn't there, that's your problem. If the directory doesn't exist, try
ls /opt/local/include/libxml++-1.0
and so on. If that's the problem, fix it.
Move the file to some source directory. Check if it works. Try a header file in some different directory. Maybe it's the unusual characters (+ and -) in the path.
#ifndef __LIBXMLCPP_H
#define __LIBXMLCPP_H
#include &libxml++/exceptions/internal_error.h&
#include &libxml++/exceptions/parse_error.h&
#include &libxml++/parsers/domparser.h&
#include &libxml++/parsers/saxparser.h&
#include &libxml++/nodes/node.h&
#include &libxml++/nodes/commentnode.h&
#include &libxml++/nodes/element.h&
#include &libxml++/nodes/entityreference.h&
#include &libxml++/nodes/textnode.h&
#include &libxml++/attribute.h&
#include &libxml++/document.h&
#endif //__LIBXMLCPP_H
So, that is my situation.
Lastly, as you all can see, my test project only has one source file as follows:
#include &CoreFoundation/CoreFoundation.h&
#include &libxml++/libxml++.h&
int main (int argc, const char * argv[]) {
// insert code here...
CFShow(CFSTR(&Hello, World!\n&));
How much simpler can it get?
todd-burchs-computer:cDistance toddburch$ ruby extconf.rb
creating Makefile
todd-burchs-computer:cDistance toddburch$ make
gcc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin9.0 -I.
-fno-common -arch ppc -arch i386 -Os -pipe -fno-common
cc -arch ppc -arch i386 -pipe -bundle -undefined dynamic_lookup -o cDistance.bundle main.o -L&.& -L&/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib& -L. -arch ppc -arch i386
-lpthread -ldl -lm
todd-burchs-computer:cDistance toddburch$
I've tried adding /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib to the Library search Path as you suggested, but the link continues to fail on the external references.
I have a friend that writes Ruby extensions with Xcode, but I think he has changed his Build system to leverage extconf.rb and make.
I'm still reading up on how to do this.
I've asked for him to create a YouTube video on his setup, but that hasn't happened yet.
He said is able to use the debugger and profiler with his setup.
That would be great.
I also edit the settings of &Header Search Path& to be /opt/local/include
# include &gsl/gsl_xxx.h&
in my program.
But Xcode2 still cannot locate the file.
Can someone save me?Click to expand...
I think I can (if very late).
I had the same problem as you, and found your post via google search.
Posting this response for the next person who does that.
Make sure you are editing your Target's settings, and not your Project's or executable's settings.
I have the same version of XCode as you, and my Target inherits &User Header Search Path& from the Project, but not &Header Search Path&.
I had to enter it directly into the target.
I am betting they fixed this for newer versions of XCode (which you and I do not have).
MacRumors Forums
Arnold Kim
Editorial Director
Eric Slivka
Editor in Chief
Juli Clover
Senior Editor
Joe Rossignol
Marianne Schultz
Dan Barbera
Video Content Producer
Mitchel Broussard
Contributing Editor
Tim Hardwick
Contributing Writer
Chris Jenkins
Contributing Writer
Copyright (C) 2000- MacRumors.com, LLC.小马激活工具(oem7)提示&Cannot open file 'C:OEMSF',拒绝访问&怎么办
解决步骤1激活系统管理员帐号(admiistato)(1)点击&开始&按钮,(2)在&搜索程序和文件&中输入&cmd&打开命令行,(3)在命令提示符中输入:etusead......
解决步骤 1.&激活系统管理员帐号(administrator) (1)点击”开始“按钮, (2)在“搜索程序和文件“中输入”cmd”打开命令行,
(3)在命令提示符中输入:net&user&administrator&/active:yes 2.&使用管理员帐号(administrator)登录系统,打开桌面上的“计算机”图标,依次选择:组织->文件夹和搜索选项->查看: & (1)取消选中:隐藏受保护的操作系统文件; (2)选中:显示隐藏的文件、文件夹和驱动器。
3. 再次点击桌面上的“计算机”图标,双击打开“本地磁盘C”。找到 OEMSF&这个文件,右键点击该文件选择“管理员取得所有权”,再次右键点击该文件选择“属性”,去掉“只读”前的勾。 4.&重新打开小马激活工具激活Win7。 &如果此方法仍无法解决,可尝试使用” nt6oem loader”“Windows&Loader”等其他Windows7激活软件。
推荐浏览:
无线共享精灵之类的虚拟AP软件都涉及到使用
怎么设置默认浏览器,默认程序怎么设置?21世纪,网上冲浪的年代
wi8升级8.1浏览器无法打开网页。由于Wi8的系统还不够成熟,所以
telet不是内部或外部命令解决方法,有些Wi7/wi8用户表示会遇到&
快速启动栏是一个很方便的工具,只需一键就可以回到电脑桌面或者
自Widow8开始微软开始采用ESD这种压缩率更高的文件格式,比WIM具
有不少用户在使用Widow7测试版时,发现它播放YouTue、土豆网、优
Widow7优化大师如何清理系统文件,Widow7优化大师是一款专业的系
Wi10新增了微软在线账户(Micooft账户)登录功能,也就是类似于
有一些朋友的电脑里图片没有显示出缩略图来,这样如果管理大量的
微软跳过了Wi9直接发布了Widow10预览版,纳尼?说好的Widow9捏&
在使用WIN7系统的时候大家可能经常遇到过各种ldquo已停止工作dqMySQL :: C connectivity to MySQL: linker error -&cannot open file &mysys-nt.lib&

我要回帖

更多关于 cannot open image 的文章

 

随机推荐