Results 1 to 6 of 6
Hi all,
i am having source code which i can easily compile and make a 64 bit application running on a 64 bit system with Fedora 3 - 64 bit ...
- 10-06-2010 #1Just Joined!
- Join Date
- Aug 2008
- Posts
- 5
Converion of 64 bit source code to 32 bit source code
Hi all,
i am having source code which i can easily compile and make a 64 bit application running on a 64 bit system with Fedora 3 - 64 bit as OS , Pentium 4 as processor and a external 64 bit PCI card inserted on the motherboard.
Now i want to run the application on 32 bit system using Fedora-32 bit and 32 bit PCI card the processor will remain same.Can any one please guide me what changes i will have to do to make a 32 bit application.
- 10-06-2010 #2
unless your source code depends on the specific memory size of variables, most code can be recompiled on a 32 bit computer and work just fine.
but it depends on what language you're using, and some other stuff maybe.
Fedora 3 is about 5 years old though, and is unsupported.New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 10-06-2010 #3Just Joined!
- Join Date
- Aug 2008
- Posts
- 5
Thanks for the reply
I am using C language does the size of variable will be changed like if am using any variable unsigned long int xyz(64 bit) in 64 bit system i have to use long int(32 bit) in 32 bit system ?
- 10-06-2010 #4
a lot depends on what compiler you are using. I don't know specificaly how much each uses.
C variable types and declarations - Wikipedia, the free encyclopedia
if you're wanting to program safely, never use a type that you expect to fit MORE than the minimum in the C standard deffinitions.
just out of curiousity, if you KNOW the application compiles and runs on a 64 bit OS, why are you chainging to 32 bit? there is almost no advantage to doing so now, unlike the past when there could be.New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 10-06-2010 #5Just Joined!
- Join Date
- Aug 2008
- Posts
- 5
U r right shifting from 64 bit to 32 bit is not a great idea but the problem is that it is a part of a project(we will need approx 100-200 motherboards) now a days it is quite hard to get a 64 bit motherboard with 64 bit PCI-X slot and if u find any it will cost u much that's why i m bound to shift to 32 bit system which i readily available in market and at very cheap price.
- 10-06-2010 #6Linux Guru
- Join Date
- Apr 2009
- Location
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
- Posts
- 8,974
You should only need to deal with 64-bit variables such as long integers (use long long integers on 32-bit machines) and pointers (if you are converting to integer values and vice-versa). Otherwise, there should not be much you need to do. The integer variable issue is often masked by headers that typedef size-specific types for this purpose, such as:
#ifdef BITS64
typedef unsigned long int uint64;
typedef long int int64;
#else
typedef unsigned long long int uint64;
typedef long long int int64;
#endif /* BITS64 */Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!


Reply With Quote