FAQ
I don't use gdb for debugging, I just insert "print" statements here and
there, in Go code or C code, to track down the culprit line.

When I replace "strtod" with "strtold", the program works.
When it is "strtod", it crashes when run on Windows, but works on Linux.



Le mercredi 15 octobre 2014 00:02:30 UTC+2, nicolas...@gmail.com a écrit :
My computer is Windows 7, 64 bits.

As I need cgo, I also installed tdm-gcc to have a 64 bits gcc.

C:\Users\rin01>go version
go version go1.3.3 windows/amd64

C:\Users\rin01>gcc -v
Using built-in specs.
COLLECT_GCC=gcc

COLLECT_LTO_WRAPPER=c:/tdm-gcc-64/bin/../libexec/gcc/x86_64-w64-mingw32/4.8.1/lto-wrapper.exe
Target: x86_64-w64-mingw32
Configured with: ../../../src/gcc-4.8.1/configure
--build=x86_64-w64-mingw32 --enable-targets=all
--enable-languages=ada,c,c++,fortran,lto,objc,obj-c++ --enable-libgomp
--enable-lto --enable-graphite
--enable-cxx-flags=-DWINPTHREAD_STATIC --enable-libstdcxx-debug
--enable-threads=posix --enable-version-specific-runtime-libs
--enable-fully-dynamic-string --enable-libstdcxx-threads --enable-libstdcx
x-time --with-gnu-ld --disable-werror --disable-nls
--disable-win32-registry --prefix=/mingw64tdm
--with-local-prefix=/mingw64tdm --with-pkgversion=tdm64-2 --with-bugurl=
http://tdm-gcc.tdragon.net/bug
s
Thread model: posix
gcc version 4.8.1 (tdm64-2)


This little Go program compiles with no problem.
http://play.golang.org/p/wm5ADXs9KV

On Linux, it runs without problem.

But when I run it on Windows, it prints "sizeof double is: 8", and then
crashes silently.
The crash occurs exactly at the C function "strtod".


Strangely enough, when I run this little C program, strtod works as
expected.
http://play.golang.org/p/ZvLIAYAa4u

Have someone the same problem ?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 5 | next ›
Discussion Overview
groupgolang-nuts @
categoriesgo
postedOct 14, '14 at 10:02p
activeOct 16, '14 at 1:34a
posts5
users3
websitegolang.org

People

Translate

site design / logo © 2021 Grokbase