473,569 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Conversion from 32-bit to 64-bit OS

4 New Member
Hi, not sure if this topic has already been addressed elsewhere (sorry but I haven't checked) but I have a source code that compiles and runs fine on my 32-bit linux platform, however, I now need to get it working on a new 64-bit OS. The code is quite long and has around 20 subroutines so rather than posting fragments of the code here (not yet anyway) I was just hoping to get some general advice on converting source code from 32-bit to 64-bit: things like any additional header files that may be required and declaration of variable types. Hope someone can offer some advice and point me in the right direction. Cheers.
May 16 '07 #1
5 4255
weaknessforcats
9,208 Recognized Expert Moderator Expert
What 64-bit OS?

64-bit Windows is different from 64-bit Unix.
May 16 '07 #2
IH8CPP
4 New Member
What 64-bit OS?

64-bit Windows is different from 64-bit Unix.
It's a 64-bit Linux OS
May 16 '07 #3
weaknessforcats
9,208 Recognized Expert Moderator Expert
Probably it should convert straight across but you need to be aware of the change from 32-bit integers to 64-bit integers. You need to check the sizes of all of the fundamental types between your 32-bit and 64-bit OSs.

Any code that writes to disk will write 64 bit integers instead of 32. Conversely any code that reads from the disc will read 64 bits. If the disc file was written with 32-bit integers, you will need to convert the file before feeding it to your 64-bit program.

The disc spreads to the displays, which are all now larger - and any reports - and all your backups, etc...

So, I expect your 32-buit code will compile but whether it runs as before will need some research.
May 16 '07 #4
Banfa
9,065 Recognized Expert Moderator Expert
Any code that writes to disk will write 64 bit integers instead of 32. Conversely any code that reads from the disc will read 64 bits. If the disc file was written with 32-bit integers, you will need to convert the file before feeding it to your 64-bit program.
Converting the file is not the only solution, you can re-write the code to read and write the file format as it already exists.
May 16 '07 #5
IH8CPP
4 New Member
[So, I expect your 32-buit code will compile but whether it runs as before will need some research.[/quote]

Hi, yes in fact the code does compile successfully - the problem arises when executing the program and trying to read in data files: segmentation fault. I have checked and the sizeof() operator returns the same value for all variable types on both the 32-bit and 64-bit linux platforms. Is there some declaration that I can implement in the source that forces the 64-bit machine to read in data files in the exact same manner as the 32-bit machine, since everything works perfectly on the 32-bit platform. Cheers
May 17 '07 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

8
1989
by: weasel | last post by:
Why is the Farenheit to Celsius part not working properly? Instead of showing a similar range of what the farenheit is listing, the celsius portion is showing half the range of farenheit. print "\nWelcome to the Temperature program" while True: low1 = raw_input("Please enter a low temperature: ").upper() if low1 != 'I QUIT': low =...
1
12124
by: deanfamily11 | last post by:
I'm trying to have this program do a simple temperature conversion from Fahrenheit to Celsius. I have confirmed that the other variable is receiving and calculating the conversion, but it is just outputting as "0". Any thoughts? (Code is below) #include <iostream> #include <iomanip> using namespace std;
34
2768
by: Kifah Abbad | last post by:
Hi guys, i found a proggie, to convert packets captured (by libpcap) to hex format...to pass them to dnet-application. Now the proggie shows results as following: 4500003ca92e00002001c96a0a0a0a0b0a0a0a0a08007ca40100cfb76162636465666768696a6b6c6d6e6f7071727374757677616263646566676869 (please go to bottom for code)
5
5767
by: Ian Rutherford | last post by:
Heya guys, It seems VB .net no longer supports the awesome ability of VB 6 to declare something as a string and specify how long the string would be all in one line: Public myString as String * 32 'this would make it 32 characters long Apparently the VB .net conversion is to do this: Public myString as String myString = new...
11
2224
by: arnuld | last post by:
i have created a new temperature conversion programme. it converts a temperature from Fahrenheit to Celsius or from Celsius to Fahrenheit at user's will. tell em if i need some improvements: // conversion of temperature // using Centigrade and Fahrenheit #include <iostream> int main() {
6
4197
by: CFAN | last post by:
Here is a example of double-type-conversion char * __cdecl _itoa ( int val, char *buf, int radix ) { if (radix == 10 && val < 0) xtoa((unsigned long)val, buf, radix, 1); else
1
1317
JavaStudent07
by: JavaStudent07 | last post by:
I have a list, I need to print it out in characters as a "Secret Message" :) this is the list, have any ideas on the conversion methods from the numbers to ASCII code format for me? 67 79 77 80 85 84 69 82 83 32 34 82 69 32 70 85 78 32 33 Thanks in advance, Steve
7
5028
by: somenath | last post by:
Hi All, I am trying to undestand "Type Conversions" from K&R book.I am not able to understand the bellow mentioned text "Conversion rules are more complicated when unsigned operands are involved. The problem is that comparisons between signed and unsigned values are machine- dependent, because they depend on the sizes of the various...
0
27234
by: maheshmohta | last post by:
Background Often while remodeling legacy application, one of the important tasks for the architects is to have an optimum usage of storage capabilities of database. Most of the legacy applications are constrained by the technology available at the time of their development and hence aren’t optimum as per current scenario. One of such cases is the...
1
1784
by: =?Utf-8?B?TWlrZSBN?= | last post by:
Hi, My conversion seems from VB6 to VB.Net of an interface to an API seem to have gone OK, but when I look at the output from the Debug.Print("Active server is " & xmlServerActive) statement, xmlServerActive only contains one character(the first one). I suspect it is being truncated. I am pretty much a novice at this sort of thing so any...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7979
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
940
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.