Click here to Skip to main content
14,738,161 members
Home » Discussions » Linux Programming
   

Linux Programming

 
AnswerRe: Using ba2str fails - why ? Pin
k50544-Mar-20 6:20
mvek50544-Mar-20 6:20 
AnswerRe: Using ba2str fails - why ? Pin
Richard MacCutchan4-Mar-20 6:34
mveRichard MacCutchan4-Mar-20 6:34 
GeneralRe: Using ba2str fails - why ? Pin
Vaclav_4-Mar-20 6:46
MemberVaclav_4-Mar-20 6:46 
GeneralRe: Using ba2str fails - why ? Pin
Richard MacCutchan4-Mar-20 7:16
mveRichard MacCutchan4-Mar-20 7:16 
AnswerSOLVED Re: Using ba2str fails - why ? Pin
Vaclav_4-Mar-20 7:33
MemberVaclav_4-Mar-20 7:33 
QuestionCan "cast looses precision " error be optioned out ? Pin
Vaclav_3-Mar-20 5:10
MemberVaclav_3-Mar-20 5:10 
AnswerRe: Can "cast looses precision " error be optioned out ? Pin
Richard MacCutchan3-Mar-20 5:43
mveRichard MacCutchan3-Mar-20 5:43 
AnswerRe: Can "cast looses precision " error be optioned out ? Pin
Daniel Pfeffer3-Mar-20 5:52
professionalDaniel Pfeffer3-Mar-20 5:52 
The compiler is complaining that you are casting a pointer to uint32_t (which is 64 bits on Linux built for x86_64) to uint32_t (which is 32 bits). You are losing half of the pointer, which is guaranteed not to end well.

The ARM code was compiled for a 32-bit ARM. If you wish to compile the code for a 64-bit processor, you will have to go carefully through the code, examining each cast and ensuring that it is still valid.

One way to make this (slightly...) less painful would be to use the C99 type uintptr_t (defined in stdint.h) or the C++ type std::uintptr_t (defined in cstdint), which gives you an integer type guaranteed to hold a pointer. You must then ensure that your structures are correctly defined.

All in all, converting a program from 32-bit to 64-bit is a non-trivial task...
Freedom is the freedom to say that two plus two make four. If that is granted, all else follows.
-- 6079 Smith W.

GeneralMessage Closed Pin
9-Mar-20 15:21
Memberwatchmeoni9-Mar-20 15:21 
AnswerRe: Can "cast looses precision " error be optioned out ? Pin
k50543-Mar-20 6:52
mvek50543-Mar-20 6:52 
AnswerSOLVED Re: Can "cast looses precision " error be optioned out ? Pin
Vaclav_3-Mar-20 9:00
MemberVaclav_3-Mar-20 9:00 
GeneralRe: SOLVED Re: Can "cast looses precision " error be optioned out ? Pin
k50543-Mar-20 11:36
mvek50543-Mar-20 11:36 
GeneralRe: SOLVED Re: Can "cast looses precision " error be optioned out ? Pin
Vaclav_3-Mar-20 14:47
MemberVaclav_3-Mar-20 14:47 
QuestionBluetooth socket failures Pin
Vaclav_28-Feb-20 6:43
MemberVaclav_28-Feb-20 6:43 
AnswerRe: Bluetooth socket failures Pin
Richard MacCutchan28-Feb-20 7:32
mveRichard MacCutchan28-Feb-20 7:32 
GeneralRe: Bluetooth socket failures Pin
Vaclav_28-Feb-20 8:12
MemberVaclav_28-Feb-20 8:12 
GeneralRe: Bluetooth socket failures Pin
k505429-Feb-20 7:14
mvek505429-Feb-20 7:14 
GeneralRe: Bluetooth socket failures Pin
Vaclav_29-Feb-20 9:27
MemberVaclav_29-Feb-20 9:27 
GeneralRe: Bluetooth socket failures Pin
Richard MacCutchan29-Feb-20 22:19
mveRichard MacCutchan29-Feb-20 22:19 
GeneralRe: Bluetooth socket failures Pin
Vaclav_1-Mar-20 5:02
MemberVaclav_1-Mar-20 5:02 
GeneralRe: Bluetooth socket failures Pin
Vaclav_28-Feb-20 9:32
MemberVaclav_28-Feb-20 9:32 
QuestionRunning console apps on windows 7 Pin
CalinNegru(fearless_)23-Feb-20 21:07
MemberCalinNegru(fearless_)23-Feb-20 21:07 
AnswerRe: Running console apps on windows 7 Pin
Victor Nijegorodov23-Feb-20 21:45
MemberVictor Nijegorodov23-Feb-20 21:45 
GeneralRe: Running console apps on windows 7 Pin
CalinNegru(fearless_)23-Feb-20 22:22
MemberCalinNegru(fearless_)23-Feb-20 22:22 
AnswerRe: Running console apps on windows 7 Pin
Richard MacCutchan23-Feb-20 21:59
mveRichard MacCutchan23-Feb-20 21:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.