public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 @ 2013-09-05 19:29 u.weber at gipko dot de 2013-09-06 20:13 ` [Bug libquadmath/58327] " burnus at gcc dot gnu.org ` (3 more replies) 0 siblings, 4 replies; 5+ messages in thread From: u.weber at gipko dot de @ 2013-09-05 19:29 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327 Bug ID: 58327 Summary: Problem of quadmath in connection with SDL2 Product: gcc Version: 4.7.2 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libquadmath Assignee: unassigned at gcc dot gnu.org Reporter: u.weber at gipko dot de "quadmath_snprintf" gives strange results, when SDL2 (http://www.libsdl.org/download-2.0.php) is additionally included. I'm using "MinGW" with "DevC++" or "Code::Blocks". The short program: extern "C" { #include "quadmath.h" } #include "SDL2\SDL.h" #include <iostream> int main(int argc, char* argv[]) { char buf[128]; quadmath_snprintf (buf, sizeof buf, "%+-#*.20Qe", 46, M_PIq); std::cout << "PI = " << (float)M_PIq << " / " << buf << std::endl; } gives the result: PI = 3.14159 / +3.78539161562520278725e-4917 but when I delete or comment the line // #include "SDL2\SDL.h" I get the expected result: PI = 3.14159 / +3.14159265358979323846e+00 I guess this is related to Bug 51007 but I don't know how to fix this problem. I would like to use "quadmath" and "SDL2" together. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libquadmath/58327] Problem of quadmath in connection with SDL2 2013-09-05 19:29 [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 u.weber at gipko dot de @ 2013-09-06 20:13 ` burnus at gcc dot gnu.org 2013-09-09 18:59 ` u.weber at gipko dot de ` (2 subsequent siblings) 3 siblings, 0 replies; 5+ messages in thread From: burnus at gcc dot gnu.org @ 2013-09-06 20:13 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327 Tobias Burnus <burnus at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |burnus at gcc dot gnu.org --- Comment #1 from Tobias Burnus <burnus at gcc dot gnu.org> --- (In reply to Ulrich Weber from comment #0) > extern "C" { > #include "quadmath.h" > } > #include "SDL2\SDL.h" > #include <iostream> Does the result change if you flip the order of the include files? ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libquadmath/58327] Problem of quadmath in connection with SDL2 2013-09-05 19:29 [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 u.weber at gipko dot de 2013-09-06 20:13 ` [Bug libquadmath/58327] " burnus at gcc dot gnu.org @ 2013-09-09 18:59 ` u.weber at gipko dot de 2013-09-09 19:24 ` u.weber at gipko dot de 2015-02-10 17:44 ` ktietz at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: u.weber at gipko dot de @ 2013-09-09 18:59 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327 --- Comment #3 from Ulrich Weber <u.weber at gipko dot de> --- Thank you for the reply. Changing the include order to #include "SDL2\SDL.h" #include <iostream> extern "C" { #include "quadmath.h" } gives me the same wrong result. ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libquadmath/58327] Problem of quadmath in connection with SDL2 2013-09-05 19:29 [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 u.weber at gipko dot de 2013-09-06 20:13 ` [Bug libquadmath/58327] " burnus at gcc dot gnu.org 2013-09-09 18:59 ` u.weber at gipko dot de @ 2013-09-09 19:24 ` u.weber at gipko dot de 2015-02-10 17:44 ` ktietz at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: u.weber at gipko dot de @ 2013-09-09 19:24 UTC (permalink / raw) To: gcc-bugs http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327 --- Comment #4 from Ulrich Weber <u.weber at gipko dot de> --- (In reply to Tobias Burnus from comment #2) > For what it is worth: It works under x86-64 Linux with GCC 4.9. > > I assume that you do not link SDL2 but you just #include the file - is that > correct? I use the linker options -lmingw32 -lquadmath -lSDL2main -lSDL2 if this is the answer to your question. When I remove the references to SDL2 here I get a linker error C:\Program Files (x86)\Dev-Cpp\MinGW32\lib\libmingw32.a(main.o) main.c:(.text.startup+0xa7): undefined reference to `WinMain@16' ^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libquadmath/58327] Problem of quadmath in connection with SDL2 2013-09-05 19:29 [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 u.weber at gipko dot de ` (2 preceding siblings ...) 2013-09-09 19:24 ` u.weber at gipko dot de @ 2015-02-10 17:44 ` ktietz at gcc dot gnu.org 3 siblings, 0 replies; 5+ messages in thread From: ktietz at gcc dot gnu.org @ 2015-02-10 17:44 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58327 Kai Tietz <ktietz at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ktietz at gcc dot gnu.org --- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> --- This sounds a bit like an issue with OP-specific invocation of ld. How are you invoke the linker? ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-02-10 17:44 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2013-09-05 19:29 [Bug libquadmath/58327] New: Problem of quadmath in connection with SDL2 u.weber at gipko dot de 2013-09-06 20:13 ` [Bug libquadmath/58327] " burnus at gcc dot gnu.org 2013-09-09 18:59 ` u.weber at gipko dot de 2013-09-09 19:24 ` u.weber at gipko dot de 2015-02-10 17:44 ` ktietz at gcc dot gnu.org
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).