Author Topic: GCC 4.1.2 available (now relocatable!)  (Read 56204 times)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: GCC 4.1.2 available
« Reply #15 on: February 27, 2007, 06:13:14 pm »
If you don't mind, what is the difference between this build and the earlier one. :?
Be a part of the solution, not a part of the problem.

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: GCC 4.1.2 available
« Reply #16 on: February 27, 2007, 06:25:48 pm »
If you don't mind, what is the difference between this build and the earlier one.
It may be installed anywhere (not restricted to C:\MinGW), without needing to add the additional directories I'd mentioned previously to Code::Blocks' compiler search paths. (Note: I haven't yet tried installing it in a path with spaces, such as "Program Files".)
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: GCC 4.1.2 available (now relocatable!)
« Reply #17 on: February 27, 2007, 06:43:00 pm »
Understood..  :)
Be a part of the solution, not a part of the problem.

Offline kylove

  • Single posting newcomer
  • *
  • Posts: 9
GCC 4.1.2 available (now relocatable!)
« Reply #18 on: February 28, 2007, 02:04:44 pm »
GCC 4.1.2 Bug

//code
#include <iostream>
using namespace std;

int main()
{
   long double pi=3.141592653589793;
   cout<<"pi=="<<pi<<endl;
   return 0;
}

//Run
pi==-8.87961e+043

//Why?

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: GCC 4.1.2 available (now relocatable!)
« Reply #19 on: February 28, 2007, 04:33:26 pm »
//Why?
After some poking around, I can only say I don't know. Something I find interesting is that GCC 3.4.5's std::cout performs as expected, but its printf() exhibits the same behavior as 4.1.2's cout (and printf). This points to changes in libstdc++.

The problem is only with the output's formatting, as the following program works as expected:
Code: [Select]
#include <iostream>
int main()
{
    long double pi = 3.141592653589793L;
    int add;
    std::cin >> add;
    std::cout << "add: " << add << "\npi + add: " << (double)(pi + add) << std::endl;
    return 0;
}
Note the cast to double -- cout appears to correctly interpret doubles. I believe this program proves that the long double's internal representation is correct.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

runtime

  • Guest
Re: GCC 4.1.2 available (now relocatable!)
« Reply #20 on: March 01, 2007, 01:20:01 am »
tsk tsk tsk C style casts  :P

Anyways...if it's this easy to build gcc (not very easy to figure out though ;) ) why doesn't GNU make official windows binaries?


Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: GCC 4.1.2 available (now relocatable!)
« Reply #21 on: March 01, 2007, 01:24:30 am »
I remember seeing that problem before, but I can't remember the gcc version neither if it was printf or cout. The explanation I got was that gcc had problems displaying and, IIRC, operating on 80-bit float numbers (long double). Maybe that's the reason Digital Mars likes to say their C++ compiler is able to work with 80-bit floats without any problems.
I just tried that with GCC 4.1.2 on Linux, using both cout and printf. It had no problems displaying the right value of pi, so I guess it's a Windows only problem.

Anyways...if it's this easy to build gcc (not very easy to figure out though ;) ) why doesn't GNU make official windows binaries?

GNU doesn't even make Linux binaries, they only provide the source, it's up to you, the OS distribution or someone else to build it.

Online stahta01

  • Lives here!
  • ****
  • Posts: 6666
    • My Best Post
Re: GCC 4.1.2 available (now relocatable!)
« Reply #22 on: March 01, 2007, 01:26:48 am »
tsk tsk tsk C style casts  :P

Anyways...if it's this easy to build gcc (not very easy to figure out though ;) ) why doesn't GNU make official windows binaries?



One, GNU does NOT normally offer binary for Windows at all.
Two, MinGW who does is waiting for all of the GCC front-ends the MinGW supports to work to an acceptable level.
MinGW says only the C front-end works at an acceptable level for them.
And, MinGW says the Ada and Java front-ends are very broken.

Note, there are websites that offer Ada and Java front-ends for GCC 4.x that work under windows so take the reason with a grain of salt.

Tim S
« Last Edit: March 01, 2007, 01:30:52 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 32 bit.
On Debian Stretch, compiling CB Trunk against wxWidgets 3.0.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

runtime

  • Guest
Re: GCC 4.1.2 available (now relocatable!)
« Reply #23 on: March 01, 2007, 01:59:07 am »
Well, someone should set up official binaries site...

But it's a heck of a lot easier to compile and all on Linux...you don't need binaries...


Offline kylove

  • Single posting newcomer
  • *
  • Posts: 9
Re: GCC 4.1.2 available (now relocatable!)
« Reply #24 on: March 02, 2007, 09:03:55 pm »
Run Command:

gcc/g++ -m64 test64bit.cpp

Result:

test64bit.cpp:1: sorry, unimplemented: 64-bit mode not compiled in



Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: GCC 4.1.2 available (now relocatable!)
« Reply #25 on: March 02, 2007, 09:55:20 pm »
64-bit mode not compiled in
The error message is quite correct: 64-bit mode was indeed not compiled in. Although I'll continue looking into the possibilities of a GCC for Windows that can produce 64-bit executables, the fact of the matter is that there are a whole slew of accompanying utilities (binutils, glibc, and various other related binaries), normally provided by the MinGW developers, that I would apparently need to rebuild myself with 64-bit support.
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline kylove

  • Single posting newcomer
  • *
  • Posts: 9
Re: GCC 4.1.2 available (now relocatable!)
« Reply #26 on: March 03, 2007, 12:31:57 am »
64 bit, no one can be translated?
SOS!I will not!
Thanks!

Offline nenin

  • Multiple posting newcomer
  • *
  • Posts: 95
Re: GCC 4.1.2 available (now relocatable!)
« Reply #27 on: March 06, 2007, 06:10:33 pm »
After installation I got errors with GDB like
Application popup: gdb.exe - No Disk : There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR6. 
(from system log, gdb send a popup with similar content, approx. 10 times on each "run")
and then codeblocks often lost gdb in any moment. Any idea?
OS: Win2K SP4 codeblocks- last nightly, gdb- 6.3.2

Offline TDragon

  • Lives here!
  • ****
  • Posts: 936
    • Twilight Dragon Media
Re: GCC 4.1.2 available (now relocatable!)
« Reply #28 on: March 06, 2007, 08:24:33 pm »
After installation I got errors with GDB like
Application popup: gdb.exe - No Disk : There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR6. 
As I have not encountered errors like this, could you provide a minimal sample case with instructions on how to reproduce it?
http://tdm-gcc.tdragon.net/ - TDM-GCC compiler suite for Windows (GCC 5.1.0 2015-06-28, 32/64-bit, no extra DLLs)

Offline nenin

  • Multiple posting newcomer
  • *
  • Posts: 95
Re: GCC 4.1.2 available (now relocatable!)
« Reply #29 on: March 07, 2007, 12:53:57 am »
After installation I got errors with GDB like
Application popup: gdb.exe - No Disk : There is no disk in the drive. Please insert a disk into drive \Device\Harddisk4\DR6. 
As I have not encountered errors like this, could you provide a minimal sample case with instructions on how to reproduce it?
Absolutely nothing special in project. It compliled/debuged fine with 4.1.1 and 3.4.*
But: I replaced one harddrive and had to change letter for new one (so, I had a second pata hdd D: drive, now second hdd is sata U:). And I have a multy-card-reader with 4 letters.   
mingw is c:\wingw
codeblocks is on c:\bin\codeblocks
I made some tests exactly now: old code (from 4.1.1) are debuged normally. Issue is with debug version from 4.1.2
I attached some project, it is placed in c:\MinGW\projects\hello_tst\
Errors with lost connection gdb<-> codeblocks recovered by rollback to older svn.

[attachment deleted by admin]
« Last Edit: March 07, 2007, 12:57:45 am by nenin »