Shared Libraries with Eclipse on 86_64 (64 bits) systems[z]
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]的更多相关文章
- 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 ...
- 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 ...
- 让32位Eclipse和64位Eclipse同时在64的Windows7上运行
转自让32位Eclipse和64位Eclipse同时在64的Windows7上运行 参考这篇文章:http://wenku.baidu.com/view/57994c270066f5335a81214 ...
- 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目录 ...
- aapt: error while loading shared libraries: libstdc++.so.6: wrong ELF class: ELFCLASS64
前阵子在ubuntu上搭载安卓的开发环境(Eclipse+Sdk+Adt),搭载是完成了,但是却出现了该问题: aapt: error while loading shared libraries: ...
- 编译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 ...
- 解决 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 ...
- 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: ...
- 【转】linux中执行外部命令提示" error while loading shared libraries"时的解决办法
今天在Centos下编译kapar 后执行时出错,老说: [root@dc01 ~]# kapar kapar: error while loading shared libraries: libsc ...
随机推荐
- POJ 2236:Wireless Network(并查集)
Wireless Network Time Limit: 10000MS Memory Limit: 65536K Total Submissions: 36363 Accepted: 150 ...
- $.each()的用法
var obj = { one:1, two:2, three:3}; $.each(obj, function(key, val) { console.log(key);//one two thre ...
- gridview 绑定多个格式相同的数据源(数据查询合并)
在做项目时,要求在同一个GridView中同时显示不同分组中的前若干条数据 几个技术要点: 1.数据分组,本方法中未用group by 2.几个结果格式相同的查询合并绑定 3.取查询结果的前或后若干条 ...
- staltStack安装配置
http://www.cnblogs.com/kevingrace/p/5570290.html
- emacs之配置speedbar
安装sr-speedbar,这样的话,speedbar就内嵌到emacs里面了 emacsConfig/speedbar-setting.el (require 'sr-speedbar) (setq ...
- HDU 2846 Repository(字典树,每个子串建树,*s的使用)
Repository Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)Total ...
- SSH&SFTP服务分离+家目录锁定
Step 1 在root用户下创建维护账号的家目录,此处以创建userftp帐号的家目录为例. mkdir -p /chroot/home/user Step 2 在root用户根目录下执行以下命令设 ...
- 清除MAC 可清除空间
一.首先:查到了官方解释 https://support.apple.com/zh-cn/HT202867官方说 在 macOS Sierra 中,当您打开优化 Mac 储存空间时,会显示“可清除”内 ...
- uva-11111-栈
注意输入和输出的结果 -9 -7 -2 2 -3 -2 -1 1 2 3 7 9 -9 -7 -2 2 -3 -1 -2 2 1 3 7 9-9 -7 -2 2 -3 -1 -2 3 2 1 7 9- ...
- 设置GO环境变量
linux的设置方法:有4个环境变量需要设置:GOROOT.GOPATH.GOBIN以及PATH.需要设置到某一个profile文件中(~/.bash_profile(单一用户)或/etc/profi ...