将代码从雪豹迁移到美洲狮,使用'x86_64'制作并链接错误 [英] Migrating code from snow leopard to mountain lion, make and linking errors with 'x86_64'

查看:75
本文介绍了将代码从雪豹迁移到美洲狮,使用'x86_64'制作并链接错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一堆经常使用的代码,这些代码打包为一个库(.a).一切都在我的旧Macbookpro运行的雪豹上运行;但是我最近买了一台新笔记本电脑,并升级到了美洲狮-现在在构建以前可以正常运行的程序时遇到了很多麻烦.

此刻,我正在尝试重新构建该库,当我运行我的makefile时,出现错误

g++ -g -I/opt/local/include -L/opt/local/lib -M -MT './obj/TB_Numerical.o' TB_Numerical.cpp -MF obj/TB_Numerical.d
make: *** No rule to make target `/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h', needed by `obj/TB_RecordKeeper.o'.  Stop.

我不熟悉Makefile,我只是从一些教程中拼凑出一些简单的东西,等等.如果发布我的Makefile有帮助,请告诉我.

如果有人可以帮助我解决这个特定错误,那将是很好的. 另外,如果有……我需要做的,是系统的新事物",以确保一切正常运行……对此,我也将不胜感激!

谢谢!

解决方案

我在这里找到了解决方案: https://stackoverflow.com /a/5321472/230468

我需要在应用程序头文件之前添加系统头文件.

为什么以任何神圣的名义,在升级到山狮之后出现了这个错误 just ,这是为什么给出了特定的(看似无用的)错误消息....我不知道

I have a bunch of code that I frequently use which I bundle as a library (.a). Everything was working on my old macbookpro running snow leopard; but I've recently gotten a new laptop, and upgraded to mountain lion -- now I'm having lots of trouble building programs that worked before.

At the moment, I'm trying to re-build that library, when I run my makefile, I get the error

g++ -g -I/opt/local/include -L/opt/local/lib -M -MT './obj/TB_Numerical.o' TB_Numerical.cpp -MF obj/TB_Numerical.d
make: *** No rule to make target `/usr/include/c++/4.2.1/i686-apple-darwin10/x86_64/bits/c++config.h', needed by `obj/TB_RecordKeeper.o'.  Stop.

I'm not versed with makefiles, I just pieced something simple together from a few tutorials etc... If posting my Makefile would help, let me know.

If someone could help me with this particular error, that would be great. Also, if there's some... like, systematic 'new-thing' I need to be doing to get everything to work right... I'd also appreciate any pointers on that!

Thanks!

解决方案

I found the solution here: https://stackoverflow.com/a/5321472/230468

I needed to include system header files before application header files...

Why, in the name of anything holy, this error just came up after upgrading to mountain lion, an why that particular (seemingly useless) error message was given.... I do not know.

这篇关于将代码从雪豹迁移到美洲狮,使用'x86_64'制作并链接错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆