Comments (6)
I think size_t
is the same as unsigned
on this architecture. Not easy to fix.
from gf.
Is there a test that I can made to confirm this ? I use ARMv7 (32 bits), I know that for example, default float format is float not double in QT tool-kit on this platform, and double on x86 and ARMv8 (64 bits).
This can be tested like with this on linux, for both ARM 32bit (v5/v6/v7 I suppose) and ARM 64bit (found in libjpeg-turbo), probably a test for each case is better here. I could at least provide some test/debug on ARMv7, and very probably soon on ARMv8
#if defined GNUC && (defined arm || defined aarch64)
There is some explanation about difference in types on both platforms here:
http://malideveloper.arm.com/downloads/ARMv8_64_bit_migration.pdf
from gf.
You can try to compile something like:
#include <iostream>
#include <type_traits>
int main() {
std::cout << std::boolalpha;
std::cout << std::is_same<unsigned, std::size_t>::value << '\n';
return 0;
}
Compile with gcc -std=c++11 file.cc
. If it prints true
, then it's the same type.
I see two possible solutions for this bug:
- easy: remove the explicit instantiation for
std::size_t
(same for Vector, Rect, etc) - difficult: make a check at build time with CheckTypeSize
I do not really like the preprocessor condition based on architecture because this error may happen on other architectures.
from gf.
Answered true. So that's the problem :(.
I didn't coded in C++ since long time and discover lot of evolutions since last time.
from gf.
gcc -o test_validation2 -std=c++11 -lstdc++ test_validation.cpp
I needed to type this to compile it, using or not -std=c++11 give the same result.
from gf.
OK. So I will remove the explicit instantiations with std::size_t. Anyway, they are not used in the library. Will come in the next push.
from gf.
Related Issues (20)
- Add macos build in Travis-CI HOT 1
- Example 40 arrow not in the right place HOT 1
- example 7 no red square HOT 1
- Rendering Problem with SquareGrid Class HOT 2
- typo in AUTHORS.md
- Custom shader and builtin variables HOT 3
- Add a state machine
- Port Swoosh to gf HOT 1
- Port "Let There Be Light" to gf
- memory leak? HOT 2
- gf_pong game not running
- gf::TextButtonWidget not updating correctly his background rectangle HOT 2
- gf::BasicText not updating correctly his local bounds HOT 3
- Error when trying to build develop branch of GF on windows
- Cmake generating only x64 build for windows on develop branch HOT 1
- Multiple windows HOT 7
- Unable to compile 101 from the wiki HOT 3
- line width of square grid not rendered correctly when greater than 7
- Build is broken. HOT 3
- Workflow questions HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gf.