Right now I’m working on another React Native project that embbed Cross Platform C++ 11 code shared with the desktop version of the application.
The desktop version of the app has been created with Qt Creator, which I did not know before.
Same input, different ouput
We are facing some issues in the shared C++ code which leads to different results in the data produced by this lower layer for the same data input. In short the results on an Intel (Windows PC/iMac) platform are not the same as an ARM one (iOS/Android).
Debugging Strategy
I’ve noticed that XCode is way more verbose by default about warnings, which may help pinpoint the problem that may be a data type conversion issue, or a thread synchronisation issue.
So I needed to build the desktop version of the app to be able to compare the results precisely. Fairly simple yes? I thought it would be. But the app failed to build in the link stage with some strange undefined references.
Found the breaks and stopped the train
This sounded as a .cpp file was not compiled at all. Parsing the makefile produced by Qt, I noticed that there was 2 files with the exact same name but living a separate folders.
A carefull review of the build log showed that the files were indeed both processed by the compiler but their output was the same object file. The last compiled files wins 8-|
The workaround was fairly simple, rename one of the files.
A bug has been submitted.
Nice
LikeLike