What is the difference between 32bit library and 64 library?
Hello guys.
I'm using this library (downloaded at http://wavelet2d.sourceforge.net/). I found out that this library is only working on 32bit systems (http://www.linuxquestions.org/questi...ol-4175543660/). Now I need to work with the library on a 64 system. I thought libraries are just a group of pure object codes so I honestly didn't expect to face this kind of problems. If you could help me understand why this is and how I can make 64bit libraries from the same source codes that made the 32bit library (perhaps where I should more look into or something, I'm NOT asking you for 100% answers if I'm annoying you by any means), then that would be great. I'd appreciate your help. Thank you. |
you run into compatility issue.. in future perhaps 64bit systems will have similar functionality as 32 bit sistems.
hope you are using latest packages. if you can afford you can make 32bit installation to usb flash or disk, or if you are on ubuntu make usb key with unetbootin and leave some space for saved data.. |
The pre-compiled libraries in that download were compiled for 32-bit. If you want 64-bit libraries, you'll have to recompile the provided source code with a 64-bit compiler. See here:
http://www.adp-gmbh.ch/cpp/gcc/create_lib.html |
Quote:
|
Quote:
Code:
g++ -Wall -c wavelet2s.cpp // compiling |
Quote:
Quote:
On a 32-bit system, "gcc file.c" will build a 32-bit binary On a 64-bit system, "gcc file.c" will build a 64-bit binary, while "gcc -m32 file.c" will build a 32-bit binary 32-bit systems can only run 32-bit code, 64-bit systems can run both 32 and 64-bit code (usually, there are a few exceptions but they're rare). |
Quote:
Quote:
|
Quote:
|
From a programming standpoint, I try to use only 32-bit libraries and 32-bit coding practices. I found 64-bit causes nothing but headaches. You can run 32-bit apps in 64-bit OS just fine. Most apps don't require more than 2 GB of RAM to run. My most complex C# code don't usually hit 200 MB of RAM. So the 2GB 32-bit limit for single apps never comes into play. I program in Microsoft Visual Studio for Windows and the Linux version. Both have x86 and 64bit modes for C# and VB. CAD and A/V apps like Photoshop can use more than 2GB of RAM for processing. Most games are 32-bit because they run on the GPU not the local RAM and CPU. I have seen more of my 64-bit code crash than the 32-bit code.
|
Quote:
|
Quote:
32-bit code also runs slower on a 64-bit machine, sometimes significantly so. If you need to stick with 32-bit for compatibility with 32-bit systems that's fine, but doing it because your programs are crashing in 64-bit means you're really screwing up somewhere. It's not always about RAM usage either. The standard 32-bit I/O libraries can't read or write files larger than 4 GB for example, even if you're never loading that much data into RAM at once. |
Quote:
It's not about "supporting" one architecture or another, you just need to match it up. If you want to build the example code in 64-bit, then you need to have the 64-bit version of all of the required libraries. If you want to build the example code in 32-bit, then you need to have the 32-bit version of all of the required libraries. That's all. You should have the option to install the 32 or 64-bit (or both) version of fftw on your system. For example, here are the fftw package options on CentOS 7 (trimmed a bit for simplicity): Code:
# yum list | grep fftw |
Quote:
|
Quote:
1) Change wavedemo1.cpp to use wavelet2s.h instead of wavelet2d.h 2) Go to the src/static directory 3) Rebuild the library in 64-bit: g++ -static -c wavelet2s.cpp ar rcs libwavelet2s64.a wavelet2s.o cp libwavelet2s64.a ../../linuxstatic/ 4) Go to the examples directory 5) 32-bit build command: g++ -m32 -static -L../linuxstatic -I../linuxstatic wavedemo1.cpp -lwavelet2s -lfftw3 -o wavedemo1-32 6) 64-bit build command: g++ -static -L../linuxstatic -I../linuxstatic wavedemo1.cpp -lwavelet2s64 -lfftw3 -o wavedemo1-64 Both wavedemo1-32 and wavedemo1-64 run without error. I'm not sure what the outputs mean, but recon.txt and diff.txt are identical between the 32 and 64-bit versions. dwtout.txt does differ, not sure if that's significant. |
Quote:
|
All times are GMT -5. The time now is 08:10 PM. |