If you followed my previous post http://linuxtortures.blogspot.com/2012/02/shared-libraries-with-eclipse.html
where I explained how to develop shared shared libraries there are a couple of extra steps that you must follow if you want to do the same onto a 84_64 system.

A. Download the appropriated version of eclipse from the official download page.

The package deployed for debian amd64 (Eclipse-CDT) does not work very well, so in this case the trick of adding the backports repository will not be useful.

B. Eclipse is java-based so you can just untar the file and execute the 'eclipse' file inside:

If you find difficulties when executing eclipse, or eclipse environment generates errors most probably there are dependencies that are not fulfilled. A non very elegant solution could be install the eclipse-cdt from the backports (It will automatically install all the needed dependencies) and then uninstall it. Then you can should be able to execute your 'manually' downloaded eclipse without issues.

C. Making and compiling Shared libraries:

Here there is a slight difference regarding the previous post. If you want to make a shared library compile within a 64 bits system you will need the 'Position Independent Code' (basically it will add the options '-fPIC'  to g++, otherwise you will receive a nice error like the following:

/usr/bin/ld: ./MyClass.o: relocation R_X86_64_32S against `vtable for MyClass' can not be used when making a shared object; recompile with -fPIC

Fortunately Eclipse allows us  to make this in a graphical way (Right click on the shared library --> Properties) and check the following check-box:

That should make the work. If you are very interested on this option you can find more information here:

http://www.technovelty.org/code/c/amd64-pic.html
Posted by Javier at 1:15 PM

Shared Libraries with Eclipse on 86_64 (64 bits) systems[z]的更多相关文章

  1. Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or dir

    问题: Ubuntu12.04安装64位系统出现编译错误error while loading shared libraries: libz.so.1: cannot open shared obje ...

  2. Position Independent Code (PIC) in shared libraries on x64

    E原文地址:http://eli.thegreenplace.net/2011/11/11/position-independent-code-pic-in-shared-libraries-on-x ...

  3. 让32位Eclipse和64位Eclipse同时在64的Windows7上运行

    转自让32位Eclipse和64位Eclipse同时在64的Windows7上运行 参考这篇文章:http://wenku.baidu.com/view/57994c270066f5335a81214 ...

  4. error while loading shared libraries: libevent-1.x.so.1

    安装完memcache后启动报错(error while loading shared libraries: libevent-1.x.so.1) 这是由于64位linux会去/usr/lib64目录 ...

  5. aapt: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64

    前阵子在ubuntu上搭载安卓的开发环境(Eclipse+Sdk+Adt),搭载是完成了,但是却出现了该问题: aapt: error while loading shared libraries: ...

  6. 编译Uboot时提示error while loading shared libraries: libz.so.1: cannot open shared object file: No such file or directory

    在Ubuntu14.04 64位系统中已经安装了libc6:i386的库,编译Uboot时提示error while loading shared libraries: libz.so.1: cann ...

  7. 解决 Linux error while loading shared libraries: cannot open shared object file: No such file or directory

    安装最新版本Emqtt,参照官方文档安装后,执行报错: Linux error while loading shared libraries libsctp.so.1: cannot open sha ...

  8. Nginx启动错误:error while loading shared libraries: libpcre.so.1

    1 # /usr/local/nginx/sbin/nginx 2 /usr/local/nginx/sbin/nginx: error while loading shared libraries: ...

  9. 【转】linux中执行外部命令提示" error while loading shared libraries"时的解决办法

    今天在Centos下编译kapar 后执行时出错,老说: [root@dc01 ~]# kapar kapar: error while loading shared libraries: libsc ...

随机推荐

  1. 《DSP using MATLAB》第2章习题Problem2.1

    1.代码: %% ------------------------------------------------------------------------ %% Output Info abo ...

  2. 在服务器上运行db:seed数据填充时,出错的问题解决

    在服务器上运行db:seed数据填充时,出错的问题解决 运行composer  dump-autoload

  3. streamsets http client && json parse && local fs 使用

    streamsets 包含了丰富的组件,origin processer destination 测试例子为集成了http client 以及json 处理 启动服务 使用docker 创建pipel ...

  4. 使用ndk-stack来查找崩溃

    logcat报错 Fatal signal 6 (SIGABRT) at 0x000025c9 (code=-6), thread 9703 (Thread-1277) 都是一些寄存器以及函数地址,真 ...

  5. macOS -- 如何通过终端开启/关闭SSH

    在macOS中(较新版),基本都会配置了SSH,能完成我们开发中绝大部分功能,所以不需要再去使用第三方的软件去操作. 不过SSH守护进程是默认禁用的,我们需要手动开启 1. 查看是否开始SSH功能 s ...

  6. 解决一个java facets问题

    经常被一个问题困扰: JavaServer Faces 2.2 can not be installed : One or more constraints have not been satisfi ...

  7. java操作word报错及解决办法

    Exception in thread "main" java.lang.UnsatisfiedLinkError: no jacob-1.17-x86 in java.libra ...

  8. java的按值传递与按引用传递

    还是比较混乱 主要看怎么理解了 java没有指针一说是因为jvm将指针给隐藏了起来 说到底还是靠地址 按值传递显然直接将内存空间的内容传递给对方 之后再与传递者无关 引用是在栈空间建一个堆空间对象的映 ...

  9. Android中如何使用JUnit进行单元测试 eclipse

    Android中如何使用JUnit进行单元测试 在我们日常开发android app的时候,需要不断地进行测试,所以使用JUnit测试框架显得格外重要,学会JUnit可以加快应用的开发周期. Andr ...

  10. 第十九课 golang中的下划线

    在 Golang 里, _ (下划线)是个特殊的标识符. 用在 import 在导包的时候,常见这个用法: 1 2 import _ "net/http/pprof" import ...