我时间紧迫,似乎无法让 Netbeans (6.9.1) 找到一个
我需要合并内存分配器形式的库 libcds,我已经编写了我认为正确合并到 ~/cds-0.8.0/cds/memory/michael/allocator.h 文件的代码。
我遇到的问题是,在我的 Netbeans 项目中,它找不到该库。
我有#include
但它说找不到该文件。我将 cds 文件夹放在 main.cpp 文件旁边。
我还在构建文件夹中运行了“build-linux-ia64.sh”脚本。
我通过 apt-get 命令安装了 boost 库 sudo apt-get install libboost1.40-all
最后,我正在运行 UBUNTU(最新版本,完全最新)。
这也是我的项目设置的图片。
I am on a time crunch, and I can't seem to get Netbeans (6.9.1) to find a library
I need to incorporate a memory allocator form libcds, I have coded what I believe to be a correct incorporation of the ~/cds-0.8.0/cds/memory/michael/allocator.h file.
The problem I have is that in my Netbeans project, it can't find the library.
I have #include <cds/memory/michael/allocator.h>
but it says it can't find the file. I placed the cds folder next to my main.cpp file.
I also ran the "build-linux-ia64.sh" script in the build folder as well.
I have the boost library installed through apt-get command sudo apt-get install libboost1.40-all
Lastly I am runing UBUNTU (Latest build, fully up to date).
Here is a picture of my project settings as well.
发布评论
评论(1)
对于想要使用此库的其他人,这里是一般指南:
首先确保您知道您的系统是 32 位还是 64 位,不要假设,因为它是 6 核、8GB 内存的野兽,它正在运行 64 位,例如我做到了。
1)在cds-0.8.0/build/sample中,复制最适合您操作系统的脚本(我对Mac用户没有建议,因为没有脚本),并将其复制到build文件夹(上一级)
2)运行脚本,可能需要一段时间,如果完成快速检查日志。
3)在netbeans中你需要设置以下配置
C++编译器:
包含目录:cds-0.8.0
其他选项: -msse2 -fno-strict-aliasing
链接器:
其他库目录:cds-0.8.0/bin/gcc-x86-linux-32
库:cds-0.8.0/bin/.../libcds.so
其他选项: -msse2 -fno-strict-aliasing -shared -fpic
祝你好运,这个库有很多希望
注意这个库仍然给我带来麻烦,但它是通过这些步骤进行编译的
To anyone else wanting to use this library here is the general guide:
First Make Sure you know if your system is 32 bits or 64, do not assume, since it is a 6 core, 8gb of Memory beast that it is running 64, like i did.
1) In the cds-0.8.0/build/sample, copy the script that best suites your os (I have no suggestions for Mac users, as there is no script), and copy it to the build folder (one level up)
2) Run the Script, it may take a while, if it finishes quick check the log.
3) In netbeans u need to set the following configurations
C++ Compiler:
Include Directories: cds-0.8.0
Additional Options: -msse2 -fno-strict-aliasing
The Linker:
Additional Library Directories: cds-0.8.0/bin/gcc-x86-linux-32
Libraries: cds-0.8.0/bin/.../libcds.so
Additional Options: -msse2 -fno-strict-aliasing -shared -fpic
Good Luck, this library has a lot of promise
Note this library is still giving me trouble, but it compiles with these steps