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. [QT][SQLITE]学习记录一 querry 查询

    使用 QSqlQuery query ; query("SELECT id FROM TABLE1 WHERE id = '2017'); 的到的结果集就是query本身,此时需要使用 qu ...

  2. 解决使用SecureCRT出现的Generic clipboard failure错误【自己亲身经历】

    2016年11月8日:[解决办法]把金山词霸卸载了 血的教训浪费了好几个小时 相关文章 1.RecureCRT could not get data from the Clipboard 和SAP快捷 ...

  3. 6-16 Topological Sort(25 分)

    Write a program to find the topological order in a digraph. Format of functions: bool TopSort( LGrap ...

  4. 【传输协议】https SSL主流数字证书都有哪些格式?

    一般来说,主流的Web服务软件,通常都基于两种基础密码库:OpenSSL和Java. Tomcat.Weblogic.JBoss等,使用Java提供的密码库.通过Java的Keytool工具,生成Ja ...

  5. opencrud 中文参考翻译(完成部分)

    opencrud 是一个就比较好的关于graphql 实现的指南(当前只有部分文档,完整的还没有,实际上apollo 有相关的文档都挺不错的) 同时在github 有一个中文的简单翻译(后期应该会和官 ...

  6. win10 下ie11安装flash debuger (install flashplayer debuger on win10 64bit)

    1不能安装的现象 由于win10  ie11  内置flash  微软不让用户自己手动更新ie11的flash以及安装flash  debugger  ,这怕是让还在用 flex 开发的大胸弟们很头疼 ...

  7. Mac下忘记mysql密码怎么办

    Mac本地安装了数据库,忘记数据库密码的情况下,可以按照以下步骤进行修改密码 step1: 关闭mysql服务: 苹果->系统偏好设置->最下边点mysql 在弹出页面中 关闭mysql服 ...

  8. 微信小程序设置底部导航栏目方法

    微信小程序底部想要有一个漂亮的导航栏目,不知道怎么制作,于是百度找到了本篇文章,分享给大家. 好了 小程序的头部标题 设置好了,我们来说说底部导航栏是如何实现的. 我们先来看个效果图 这里,我们添加了 ...

  9. C# 基础备忘录

    1. decimal 类型调用ToString()方法后没把末尾的0去掉的解决办法: 例子:decimal? money = Convert.ToDecimal(10.8950); string mo ...

  10. Javamail使用代码整理

    package com.hengrun.mail; import java.io.*; import java.security.Security; import java.text.SimpleDa ...