473,508 Members | 2,357 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 4250
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
1979
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...
1
12118
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...
34
2752
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:...
5
5749
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 *...
11
2218
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: ...
6
4188
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
1307
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...
7
5024
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...
0
27211
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...
1
1779
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,...
0
7120
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7323
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7380
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...
1
7039
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7494
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...
1
5050
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...
0
4706
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...
0
3192
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...
0
3180
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.