No C++?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

No C++?

Post by pcmattman »

I'm wanting to write my kernel in C++ (C is alright, but I like the OO features of C++) but when I try to build, GCC tells me it can't find 'cc1plus' - and a search in my DJGPP 'bin' directory shows it's not there. After Googling, I found that releases of GCC after a certain version don't have 'cc1plus' included. Does ayone know where I can get just 'cc1plus' without downloading the entire GCC or binutils package?
User avatar
ucosty
Member
Member
Posts: 271
Joined: Tue Aug 08, 2006 7:43 am
Location: Sydney, Australia

Post by ucosty »

Download and install G++, it's the C++ module for GCC.
The cake is a lie | rackbits.com
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

I found a file called 'cc1plus.exe.gz' on SourceForge, so I'm assuming that if I download that it'll be what I'm looking for. Otherwise, I'll just get G++.
User avatar
ucosty
Member
Member
Posts: 271
Joined: Tue Aug 08, 2006 7:43 am
Location: Sydney, Australia

Post by ucosty »

Since you're using DJGPP, have you tried the DJGPP site?

This is the package you need:
ftp://ftp.delorie.com/pub/djgpp/current ... pp410b.zip
The cake is a lie | rackbits.com
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

:oops: didn't think of that.
User avatar
Happy Egghead
Member
Member
Posts: 32
Joined: Thu Oct 19, 2006 5:25 am
Location: Adelaide, Australia
Contact:

Post by Happy Egghead »

Hello,
I am also having same problem but with C (gcc).

I am using latest version of Cygwin and have successfully built the cross compiler. Code compiles Ok under both.

The problem occurs when I try to compile BOCHS for myself.
The "./configure runs" and then announces that there is no "default file extension - cannot create executables".
When looking at config.log the problem is not being able to find "CC1" rather than "CC1plus".

The cross compiler uses a completely different name, so I know it's not that, but I would have thought Cygwin would have had *everything*.
Looking at it, there's no CC1plus either.
Have redownloaded gcc and gpp from cygwin site just in case.

Never thought DJGPP and CYGWIN could suffer the same problems!

Anyones help would be appreciated.

Thanks

PS I do have the pre-made windows version of BOCHS installed, I just want to be able to control the installed options myself.
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Post by pcmattman »

You have to make sure that you get the Cygwin binutils - without them you just have a bash shell on Windows - no GCC.

Run the installer again, you should be able to select 'binutils' or something similar as an option.
User avatar
Happy Egghead
Member
Member
Posts: 32
Joined: Thu Oct 19, 2006 5:25 am
Location: Adelaide, Australia
Contact:

Post by Happy Egghead »

Hi,

Thanks for the reply.

I ran the Cygwin setup and checked for binutils. It was installed, but I reinstalled it anyway. I also downloaded the source file.
I found that cc1 and gcc1 aren't in the package nor in the source code either, so I can't even build them myself!

[edit]
Ok this is weird, I found CC1 and GCC1 in the /lib/gcc/i686-pc-cygwin/3.4.4/
directory and copied them over into the /bin directory.
./configure now jams on crt2.o no file or directory.
Copying crt.o from /lib/mingw into the bochs source directory leads to another problem - cant find -lmingw.

From the looks of it, Cygwin can't find it's own libraries (even though they work perfectly well in compiling my other apps!)

I'll try doing a local reinstall to see if that fixes it, but WHAT THE????

[b]CONTINUED AND FIXED[/b]

Before I wiped everything, I reinstalled all the mygwin libraries that cygwin uses. All of a sudden everything works.
Bochs compiles perfectly without complaint.
Is seems that some of the packages installed after the core-cygwin must do something Cygwins paths, installing those mingw libraries fixes it.

After checking the web it appears that this is a known problem and so I have posted the solution in the Wiki page for Cygwin under "Cygwin Problems". Just so noone else has to go nuts trying to find CC's.

I'm a Happy Egghead again. :D
Post Reply