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. EM算法的思考

    参考文献1: http://blog.sina.com.cn/s/blog_6c7b434d01013zwe.html 参考文献2: http://www.cnblogs.com/jerrylead/ ...

  2. Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.elasticsearch.threadpool.ThreadPool

    springboot中遇到的, 将guava添加到项目中即可.(当时添加的是guava 18)

  3. CH1809 匹配统计

    题意 描述 阿轩在纸上写了两个字符串,分别记为A和B.利用在数据结构与算法课上学到的知识,他很容易地求出了"字符串A从任意位置开始的后缀子串"与"字符串B"匹配 ...

  4. Array.new(5, [1, 2, 3]) or Array.new(5) { [1, 2, 3] }的差别

    Array.new(5, [1, 2, 3]) or Array.new(5) { [1, 2, 3] } Array.new(size, default_object) creates an arr ...

  5. cocos2dx内存管理机制

    参考以下两篇文章 http://blog.csdn.net/ring0hx/article/details/7946397 http://blog.csdn.net/whuancai/article/ ...

  6. java程序运行时内存分配详解

    java程序运行时内存分配详解 这篇文章主要介绍了java程序运行时内存分配详解 ,需要的朋友可以参考下   一. 基本概念 每运行一个java程序会产生一个java进程,每个java进程可能包含一个 ...

  7. Hystrix已经停止开发,官方推荐替代项目Resilience4j

    随着微服务的流行,熔断作为其中一项很重要的技术也广为人知.当微服务的运行质量低于某个临界值时,启动熔断机制,暂停微服务调用一段时间,以保障后端的微服务不会因为持续过负荷而宕机.本文介绍了新一代熔断器R ...

  8. AngularJS 最佳实践

    AngularJS 是一个 Web 应用框架,它实现了前端的 MVC 架构,能让开发人员很方便地实现业务逻辑. 举个栗子,要做到下面的效果,以前可能需要写一连串的 JavaScript 代码绑定 N ...

  9. Hive插入数据的几种常用方法

    Hive的几种常见的数据导入方式这里介绍四种:(1).从本地文件系统中导入数据到Hive表:(2).从HDFS上导入数据到Hive表:(3).从别的表中查询出相应的数据并导入到Hive表中:(4).在 ...

  10. Lucene 中的Tokenizer, TokenFilter学习

      lucene中的TokenStream,TokenFilter之间关系   TokenStream是一个能够在被调用后产生语汇单元序列的类,其中有两个类型:Tokenizer和TokenFilte ...