Loading ...
Sorry, an error occurred while loading the content.

RE: C++, is it possible?

Expand Messages
  • Keith V
    OK Mark, I m back to using make files:P I m doing a simple test and G++ is looking for lstdc++ which I take it is libstdc++? How do you get Gnu to link without
    Message 1 of 17 , Feb 11, 2010
    • 0 Attachment
      OK Mark, I'm back to using make files:P
      I'm doing a simple test and G++ is looking for lstdc++ which I take it is libstdc++?

      How do you get Gnu to link without it?

      Thanks
      Keith


      To: gnu-m68hc11@yahoogroups.com
      From: mark.04@...
      Date: Sun, 31 Jan 2010 13:04:37 -0500
      Subject: Re: C++, is it possible?

       

      Sorry, I haven't learned Eclipse (yet). I still use an old version of Visual SlickEdit as my IDE. Anyone else? --Mark

      From: Keith V
      Sent: Sunday, January 31, 2010 10:47 AM
      Subject: RE: C++, is it possible?

       
      OK makes sense,
      Now this is more of a eclipse question than a compiler question...

      I can add a *.c file to my project and have it compile, but a *.cpp file is just ignored.

      So how do I add a CPP file to the project and have it compile??
      It seems like I need to edit 'project properties, C/C++ General, Paths and Symbols' as it only shows C source Files but I can find no way to add C++ source files




      To: gnu-m68hc11@ yahoogroups. com
      From: mark.04@live. com
      Date: Fri, 29 Jan 2010 20:56:24 -0500
      Subject: Re: C++, is it possible?

       

      Yes, main is used in C++ exactly like it's used in C. It's not part of a class. I put it in its own source file, main.cpp. Just remember that it needs C linkage so the linker will recognize it.
       
      extern "C" int main ()
      {
       
          // Initialize class objects somewhere in here.
          Object1.Init( );
          Object2.Init( );

      }
       
      Yes, I don't list any constructors or destructors in any class. The compiler assumes the default constructor and destructor, which are optimized away to nothing. For each class that needs it, I add a member function (Init) to initialize the data members.
       
      I learned how to use m6811-elf-gcc from http://m68hc11. serveftp. org/ and this Yahoo group. http://gcc-hcs12. com/ probably would have saved me time if I knew about it back then.
       
      Mark

      From: Keith V
      Sent: Friday, January 29, 2010 3:44 PM
      Subject: RE: C++, is it possible?

       
      So Mark,
      Any chance you can share how you set up you project?

      Do you have a class for main, or is main just a global that creates and calls classes?

      I'm really not interested in the more esoteric features of C++, just classes. inheritance COULD be nice, but far from necessary.

      Also, how do you not use constructors?
      Do you mean you just leave them empty?
      Or don't even write one, just use the default constructor? ?

      TIA
      Keith



      To: gnu-m68hc11@ yahoogroups. com
      From: mark.04@live. com
      Date: Thu, 28 Jan 2010 13:30:19 -0500
      Subject: Re: C++, is it possible?

       

      Keith,
       
      Yes and no. GCC for the 'S12 doesn't come with GNU's libstdc++. So virtual functions and inheritance don't work. But I've been compiling my code as C++ anyway for the last year or two because many valuable aspects of C++ are available from the rest of the GCC compiler and tool chain, including classes (as long as they're concrete classes), inline functions, polymorphism with name mangling, namespaces, and strict typecasting. The optimizer does a fine job and produces results that are just as tight and fast as straight C. If I remember correctly, constructors work, but not in all cases. I don't use them because this version of GCC usually generates two copies of every constructor in the compiled output.
       
      Mark

      From: kvasilak
      Sent: Wednesday, January 27, 2010 10:23 PM
      Subject: C++, is it possible?

       
      I see a few threads on here about problems with c++, so it SEEMS possible.
      I'd really like to give it a try, but I'm new to GCC and I'm using eclipse, so I'm a bit lost.
      I do know C++, I don't know compilers as I've used IDE's all my life.

      So I was wondering if I could get a push in the general direction?

      The goal is a small C++ program running on a MC9s12.

      There's more detail if necessary

      thanks in advance
      keith





      Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




      Hotmail: Free, trusted and rich email service. Get it now.




      Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
    • said jello
      Use CodeWarrior. Freescale has removed any code restriction they used to have. Try the special (free) version. It comes loaded with everything and has a serial
      Message 2 of 17 , Feb 12, 2010
      • 0 Attachment
        Use CodeWarrior.
        Freescale has removed any code restriction they used to have.
        Try the special (free) version.
        It comes loaded with everything and has a serial debugger that is out of this world. I have used GCC for a long time. But I find CW to be far superior.
        Sorry for the GCC folks here. This is just my personal opinion.



        From: Keith V <my427v8@...>
        To: gnu-m68hc11@yahoogroups.com
        Sent: Thu, February 11, 2010 9:49:07 PM
        Subject: RE: C++, is it possible?

         

        OK Mark, I'm back to using make files:P
        I'm doing a simple test and G++ is looking for lstdc++ which I take it is libstdc++?

        How do you get Gnu to link without it?

        Thanks
        Keith


        To: gnu-m68hc11@ yahoogroups. com
        From: mark.04@live. com
        Date: Sun, 31 Jan 2010 13:04:37 -0500
        Subject: Re: C++, is it possible?

         

        Sorry, I haven't learned Eclipse (yet). I still use an old version of Visual SlickEdit as my IDE. Anyone else? --Mark

        From: Keith V
        Sent: Sunday, January 31, 2010 10:47 AM
        Subject: RE: C++, is it possible?

         
        OK makes sense,
        Now this is more of a eclipse question than a compiler question...

        I can add a *.c file to my project and have it compile, but a *.cpp file is just ignored.

        So how do I add a CPP file to the project and have it compile??
        It seems like I need to edit 'project properties, C/C++ General, Paths and Symbols' as it only shows C source Files but I can find no way to add C++ source files




        To: gnu-m68hc11@ yahoogroups. com
        From: mark.04@live. com
        Date: Fri, 29 Jan 2010 20:56:24 -0500
        Subject: Re: C++, is it possible?

         

        Yes, main is used in C++ exactly like it's used in C. It's not part of a class. I put it in its own source file, main.cpp. Just remember that it needs C linkage so the linker will recognize it.
         
        extern "C" int main ()
        {
         
            // Initialize class objects somewhere in here.
            Object1.Init( );
            Object2.Init( );

        }
         
        Yes, I don't list any constructors or destructors in any class. The compiler assumes the default constructor and destructor, which are optimized away to nothing. For each class that needs it, I add a member function (Init) to initialize the data members.
         
        I learned how to use m6811-elf-gcc from http://m68hc11. serveftp. org/ and this Yahoo group. http://gcc-hcs12. com/ probably would have saved me time if I knew about it back then.
         
        Mark

        From: Keith V
        Sent: Friday, January 29, 2010 3:44 PM
        Subject: RE: C++, is it possible?

         
        So Mark,
        Any chance you can share how you set up you project?

        Do you have a class for main, or is main just a global that creates and calls classes?

        I'm really not interested in the more esoteric features of C++, just classes. inheritance COULD be nice, but far from necessary.

        Also, how do you not use constructors?
        Do you mean you just leave them empty?
        Or don't even write one, just use the default constructor? ?

        TIA
        Keith



        To: gnu-m68hc11@ yahoogroups. com
        From: mark.04@live. com
        Date: Thu, 28 Jan 2010 13:30:19 -0500
        Subject: Re: C++, is it possible?

         

        Keith,
         
        Yes and no. GCC for the 'S12 doesn't come with GNU's libstdc++. So virtual functions and inheritance don't work. But I've been compiling my code as C++ anyway for the last year or two because many valuable aspects of C++ are available from the rest of the GCC compiler and tool chain, including classes (as long as they're concrete classes), inline functions, polymorphism with name mangling, namespaces, and strict typecasting. The optimizer does a fine job and produces results that are just as tight and fast as straight C. If I remember correctly, constructors work, but not in all cases. I don't use them because this version of GCC usually generates two copies of every constructor in the compiled output.
         
        Mark

        From: kvasilak
        Sent: Wednesday, January 27, 2010 10:23 PM
        Subject: C++, is it possible?

         
        I see a few threads on here about problems with c++, so it SEEMS possible.
        I'd really like to give it a try, but I'm new to GCC and I'm using eclipse, so I'm a bit lost.
        I do know C++, I don't know compilers as I've used IDE's all my life.

        So I was wondering if I could get a push in the general direction?

        The goal is a small C++ program running on a MC9s12.

        There's more detail if necessary

        thanks in advance
        keith





        Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




        Hotmail: Free, trusted and rich email service. Get it now.




        Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.

      • Keith V
        I did try it. there is a very small limit on the number of C++ lines. At least as up to a week or two ago. Where did you see that their license structure has
        Message 3 of 17 , Feb 12, 2010
        • 0 Attachment
          I did try it. there is a very small limit on the number of C++ lines.
          At least as up to a week or two ago.
          Where did you see that their license structure has changed?

          I use CW at work with a pro license and yes, I like it. But alas my license is only for Hc08's


          To: gnu-m68hc11@yahoogroups.com
          From: sjellouli@...
          Date: Fri, 12 Feb 2010 02:50:21 -0800
          Subject: Re: C++, is it possible?

           

          Use CodeWarrior.
          Freescale has removed any code restriction they used to have.
          Try the special (free) version.
          It comes loaded with everything and has a serial debugger that is out of this world. I have used GCC for a long time. But I find CW to be far superior.
          Sorry for the GCC folks here. This is just my personal opinion.



          From: Keith V <my427v8@hotmail. com>
          To: gnu-m68hc11@ yahoogroups. com
          Sent: Thu, February 11, 2010 9:49:07 PM
          Subject: RE: C++, is it possible?

           
          OK Mark, I'm back to using make files:P
          I'm doing a simple test and G++ is looking for lstdc++ which I take it is libstdc++?

          How do you get Gnu to link without it?

          Thanks
          Keith



          To: gnu-m68hc11@ yahoogroups. com
          From: mark.04@live. com
          Date: Sun, 31 Jan 2010 13:04:37 -0500
          Subject: Re: C++, is it possible?

           

          Sorry, I haven't learned Eclipse (yet). I still use an old version of Visual SlickEdit as my IDE. Anyone else? --Mark

          From: Keith V
          Sent: Sunday, January 31, 2010 10:47 AM
          Subject: RE: C++, is it possible?

           
          OK makes sense,
          Now this is more of a eclipse question than a compiler question...

          I can add a *.c file to my project and have it compile, but a *.cpp file is just ignored.

          So how do I add a CPP file to the project and have it compile??
          It seems like I need to edit 'project properties, C/C++ General, Paths and Symbols' as it only shows C source Files but I can find no way to add C++ source files




          To: gnu-m68hc11@ yahoogroups. com
          From: mark.04@live. com
          Date: Fri, 29 Jan 2010 20:56:24 -0500
          Subject: Re: C++, is it possible?

           

          Yes, main is used in C++ exactly like it's used in C. It's not part of a class. I put it in its own source file, main.cpp. Just remember that it needs C linkage so the linker will recognize it.
           
          extern "C" int main ()
          {
           
              // Initialize class objects somewhere in here.
              Object1.Init( );
              Object2.Init( );

          }
           
          Yes, I don't list any constructors or destructors in any class. The compiler assumes the default constructor and destructor, which are optimized away to nothing. For each class that needs it, I add a member function (Init) to initialize the data members.
           
          I learned how to use m6811-elf-gcc from http://m68hc11. serveftp. org/ and this Yahoo group. http://gcc-hcs12. com/ probably would have saved me time if I knew about it back then.
           
          Mark

          From: Keith V
          Sent: Friday, January 29, 2010 3:44 PM
          Subject: RE: C++, is it possible?

           
          So Mark,
          Any chance you can share how you set up you project?

          Do you have a class for main, or is main just a global that creates and calls classes?

          I'm really not interested in the more esoteric features of C++, just classes. inheritance COULD be nice, but far from necessary.

          Also, how do you not use constructors?
          Do you mean you just leave them empty?
          Or don't even write one, just use the default constructor? ?

          TIA
          Keith



          To: gnu-m68hc11@ yahoogroups. com
          From: mark.04@live. com
          Date: Thu, 28 Jan 2010 13:30:19 -0500
          Subject: Re: C++, is it possible?

           

          Keith,
           
          Yes and no. GCC for the 'S12 doesn't come with GNU's libstdc++. So virtual functions and inheritance don't work. But I've been compiling my code as C++ anyway for the last year or two because many valuable aspects of C++ are available from the rest of the GCC compiler and tool chain, including classes (as long as they're concrete classes), inline functions, polymorphism with name mangling, namespaces, and strict typecasting. The optimizer does a fine job and produces results that are just as tight and fast as straight C. If I remember correctly, constructors work, but not in all cases. I don't use them because this version of GCC usually generates two copies of every constructor in the compiled output.
           
          Mark

          From: kvasilak
          Sent: Wednesday, January 27, 2010 10:23 PM
          Subject: C++, is it possible?

           
          I see a few threads on here about problems with c++, so it SEEMS possible.
          I'd really like to give it a try, but I'm new to GCC and I'm using eclipse, so I'm a bit lost.
          I do know C++, I don't know compilers as I've used IDE's all my life.

          So I was wondering if I could get a push in the general direction?

          The goal is a small C++ program running on a MC9s12.

          There's more detail if necessary

          thanks in advance
          keith





          Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




          Hotmail: Free, trusted and rich email service. Get it now.




          Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




          Hotmail: Powerful Free email with security by Microsoft. Get it now.
        • said jello
          I typically write fairly large programs, well beyond the 32 K or even the 64 K advertised at times. And I have NEVER had any issue whatsoever. I have been able
          Message 4 of 17 , Feb 12, 2010
          • 0 Attachment
            I typically write fairly large programs, well beyond the 32 K or even the 64 K advertised at times. And I have NEVER had any issue whatsoever.
            I have been able to compile, and run, a decent RTOS that is well above 100 K, and CW did not flinch.
            I dare anybody to tell me what is the code limit on the free (special edition) version of CW. I haven't been able to find that limit yet.
            Just use it and you will be happy.
            Since CW came about some years ago, there is very little development going on for the GCC.
            Add to it a lack of debugging tools (source code debugging tools), and you can see why very few people continue using GCC.
            Some insist on using it. I don't have a problem with that. But in my humble opinion, they are going about this the hard way.
            Your call!!!


            From: Keith V <my427v8@...>
            To: gnu-m68hc11@yahoogroups.com
            Sent: Fri, February 12, 2010 9:08:21 AM
            Subject: RE: C++, is it possible?

             

            I did try it. there is a very small limit on the number of C++ lines.
            At least as up to a week or two ago.
            Where did you see that their license structure has changed?

            I use CW at work with a pro license and yes, I like it. But alas my license is only for Hc08's


            To: gnu-m68hc11@ yahoogroups. com
            From: sjellouli@yahoo. com
            Date: Fri, 12 Feb 2010 02:50:21 -0800
            Subject: Re: C++, is it possible?

             

            Use CodeWarrior.
            Freescale has removed any code restriction they used to have.
            Try the special (free) version.
            It comes loaded with everything and has a serial debugger that is out of this world. I have used GCC for a long time. But I find CW to be far superior.
            Sorry for the GCC folks here. This is just my personal opinion.



            From: Keith V <my427v8@hotmail. com>
            To: gnu-m68hc11@ yahoogroups. com
            Sent: Thu, February 11, 2010 9:49:07 PM
            Subject: RE: C++, is it possible?

             
            OK Mark, I'm back to using make files:P
            I'm doing a simple test and G++ is looking for lstdc++ which I take it is libstdc++?

            How do you get Gnu to link without it?

            Thanks
            Keith



            To: gnu-m68hc11@ yahoogroups. com
            From: mark.04@live. com
            Date: Sun, 31 Jan 2010 13:04:37 -0500
            Subject: Re: C++, is it possible?

             

            Sorry, I haven't learned Eclipse (yet). I still use an old version of Visual SlickEdit as my IDE. Anyone else? --Mark

            From: Keith V
            Sent: Sunday, January 31, 2010 10:47 AM
            Subject: RE: C++, is it possible?

             
            OK makes sense,
            Now this is more of a eclipse question than a compiler question...

            I can add a *.c file to my project and have it compile, but a *.cpp file is just ignored.

            So how do I add a CPP file to the project and have it compile??
            It seems like I need to edit 'project properties, C/C++ General, Paths and Symbols' as it only shows C source Files but I can find no way to add C++ source files




            To: gnu-m68hc11@ yahoogroups. com
            From: mark.04@live. com
            Date: Fri, 29 Jan 2010 20:56:24 -0500
            Subject: Re: C++, is it possible?

             

            Yes, main is used in C++ exactly like it's used in C. It's not part of a class. I put it in its own source file, main.cpp. Just remember that it needs C linkage so the linker will recognize it.
             
            extern "C" int main ()
            {
             
                // Initialize class objects somewhere in here.
                Object1.Init( );
                Object2.Init( );

            }
             
            Yes, I don't list any constructors or destructors in any class. The compiler assumes the default constructor and destructor, which are optimized away to nothing. For each class that needs it, I add a member function (Init) to initialize the data members.
             
            I learned how to use m6811-elf-gcc from http://m68hc11. serveftp. org/ and this Yahoo group. http://gcc-hcs12. com/ probably would have saved me time if I knew about it back then.
             
            Mark

            From: Keith V
            Sent: Friday, January 29, 2010 3:44 PM
            Subject: RE: C++, is it possible?

             
            So Mark,
            Any chance you can share how you set up you project?

            Do you have a class for main, or is main just a global that creates and calls classes?

            I'm really not interested in the more esoteric features of C++, just classes. inheritance COULD be nice, but far from necessary.

            Also, how do you not use constructors?
            Do you mean you just leave them empty?
            Or don't even write one, just use the default constructor? ?

            TIA
            Keith



            To: gnu-m68hc11@ yahoogroups. com
            From: mark.04@live. com
            Date: Thu, 28 Jan 2010 13:30:19 -0500
            Subject: Re: C++, is it possible?

             

            Keith,
             
            Yes and no. GCC for the 'S12 doesn't come with GNU's libstdc++. So virtual functions and inheritance don't work. But I've been compiling my code as C++ anyway for the last year or two because many valuable aspects of C++ are available from the rest of the GCC compiler and tool chain, including classes (as long as they're concrete classes), inline functions, polymorphism with name mangling, namespaces, and strict typecasting. The optimizer does a fine job and produces results that are just as tight and fast as straight C. If I remember correctly, constructors work, but not in all cases. I don't use them because this version of GCC usually generates two copies of every constructor in the compiled output.
             
            Mark

            From: kvasilak
            Sent: Wednesday, January 27, 2010 10:23 PM
            Subject: C++, is it possible?

             
            I see a few threads on here about problems with c++, so it SEEMS possible.
            I'd really like to give it a try, but I'm new to GCC and I'm using eclipse, so I'm a bit lost.
            I do know C++, I don't know compilers as I've used IDE's all my life.

            So I was wondering if I could get a push in the general direction?

            The goal is a small C++ program running on a MC9s12.

            There's more detail if necessary

            thanks in advance
            keith





            Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




            Hotmail: Free, trusted and rich email service. Get it now.




            Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




            Hotmail: Powerful Free email with security by Microsoft. Get it now.

          • Keith V
            Well it sure sounds like you have a standard license or even a pro license, not the special free edition. Also are you writing C++ or C? you need the pro
            Message 5 of 17 , Feb 12, 2010
            • 0 Attachment
              Well it sure sounds like you have a standard license or even a pro license, not the special free edition.
              Also are you writing C++ or C? you need the pro license to use C++ in any significant manner.

              I hit the special free edition C++ limit pretty easily with 4 classes with barely more than constructors and destructors.


              To: gnu-m68hc11@yahoogroups.com
              From: sjellouli@...
              Date: Fri, 12 Feb 2010 08:47:37 -0800
              Subject: Re: C++, is it possible?

               

              I typically write fairly large programs, well beyond the 32 K or even the 64 K advertised at times. And I have NEVER had any issue whatsoever.
              I have been able to compile, and run, a decent RTOS that is well above 100 K, and CW did not flinch.
              I dare anybody to tell me what is the code limit on the free (special edition) version of CW. I haven't been able to find that limit yet.
              Just use it and you will be happy.
              Since CW came about some years ago, there is very little development going on for the GCC.
              Add to it a lack of debugging tools (source code debugging tools), and you can see why very few people continue using GCC.
              Some insist on using it. I don't have a problem with that. But in my humble opinion, they are going about this the hard way.
              Your call!!!


              From: Keith V <my427v8@hotmail. com>
              To: gnu-m68hc11@ yahoogroups. com
              Sent: Fri, February 12, 2010 9:08:21 AM
              Subject: RE: C++, is it possible?

               
              I did try it. there is a very small limit on the number of C++ lines.
              At least as up to a week or two ago.
              Where did you see that their license structure has changed?

              I use CW at work with a pro license and yes, I like it. But alas my license is only for Hc08's



              To: gnu-m68hc11@ yahoogroups. com
              From: sjellouli@yahoo. com
              Date: Fri, 12 Feb 2010 02:50:21 -0800
              Subject: Re: C++, is it possible?

               

              Use CodeWarrior.
              Freescale has removed any code restriction they used to have.
              Try the special (free) version.
              It comes loaded with everything and has a serial debugger that is out of this world. I have used GCC for a long time. But I find CW to be far superior.
              Sorry for the GCC folks here. This is just my personal opinion.



              From: Keith V <my427v8@hotmail. com>
              To: gnu-m68hc11@ yahoogroups. com
              Sent: Thu, February 11, 2010 9:49:07 PM
              Subject: RE: C++, is it possible?

               
              OK Mark, I'm back to using make files:P
              I'm doing a simple test and G++ is looking for lstdc++ which I take it is libstdc++?

              How do you get Gnu to link without it?

              Thanks
              Keith



              To: gnu-m68hc11@ yahoogroups. com
              From: mark.04@live. com
              Date: Sun, 31 Jan 2010 13:04:37 -0500
              Subject: Re: C++, is it possible?

               

              Sorry, I haven't learned Eclipse (yet). I still use an old version of Visual SlickEdit as my IDE. Anyone else? --Mark

              From: Keith V
              Sent: Sunday, January 31, 2010 10:47 AM
              Subject: RE: C++, is it possible?

               
              OK makes sense,
              Now this is more of a eclipse question than a compiler question...

              I can add a *.c file to my project and have it compile, but a *.cpp file is just ignored.

              So how do I add a CPP file to the project and have it compile??
              It seems like I need to edit 'project properties, C/C++ General, Paths and Symbols' as it only shows C source Files but I can find no way to add C++ source files




              To: gnu-m68hc11@ yahoogroups. com
              From: mark.04@live. com
              Date: Fri, 29 Jan 2010 20:56:24 -0500
              Subject: Re: C++, is it possible?

               

              Yes, main is used in C++ exactly like it's used in C. It's not part of a class. I put it in its own source file, main.cpp. Just remember that it needs C linkage so the linker will recognize it.
               
              extern "C" int main ()
              {
               
                  // Initialize class objects somewhere in here.
                  Object1.Init( );
                  Object2.Init( );

              }
               
              Yes, I don't list any constructors or destructors in any class. The compiler assumes the default constructor and destructor, which are optimized away to nothing. For each class that needs it, I add a member function (Init) to initialize the data members.
               
              I learned how to use m6811-elf-gcc from http://m68hc11. serveftp. org/ and this Yahoo group. http://gcc-hcs12. com/ probably would have saved me time if I knew about it back then.
               
              Mark

              From: Keith V
              Sent: Friday, January 29, 2010 3:44 PM
              Subject: RE: C++, is it possible?

               
              So Mark,
              Any chance you can share how you set up you project?

              Do you have a class for main, or is main just a global that creates and calls classes?

              I'm really not interested in the more esoteric features of C++, just classes. inheritance COULD be nice, but far from necessary.

              Also, how do you not use constructors?
              Do you mean you just leave them empty?
              Or don't even write one, just use the default constructor? ?

              TIA
              Keith



              To: gnu-m68hc11@ yahoogroups. com
              From: mark.04@live. com
              Date: Thu, 28 Jan 2010 13:30:19 -0500
              Subject: Re: C++, is it possible?

               

              Keith,
               
              Yes and no. GCC for the 'S12 doesn't come with GNU's libstdc++. So virtual functions and inheritance don't work. But I've been compiling my code as C++ anyway for the last year or two because many valuable aspects of C++ are available from the rest of the GCC compiler and tool chain, including classes (as long as they're concrete classes), inline functions, polymorphism with name mangling, namespaces, and strict typecasting. The optimizer does a fine job and produces results that are just as tight and fast as straight C. If I remember correctly, constructors work, but not in all cases. I don't use them because this version of GCC usually generates two copies of every constructor in the compiled output.
               
              Mark

              From: kvasilak
              Sent: Wednesday, January 27, 2010 10:23 PM
              Subject: C++, is it possible?

               
              I see a few threads on here about problems with c++, so it SEEMS possible.
              I'd really like to give it a try, but I'm new to GCC and I'm using eclipse, so I'm a bit lost.
              I do know C++, I don't know compilers as I've used IDE's all my life.

              So I was wondering if I could get a push in the general direction?

              The goal is a small C++ program running on a MC9s12.

              There's more detail if necessary

              thanks in advance
              keith





              Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




              Hotmail: Free, trusted and rich email service. Get it now.




              Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.




              Hotmail: Powerful Free email with security by Microsoft. Get it now.




              Your E-mail and More On-the-Go. Get Windows Live Hotmail Free. Sign up now.
            • alex_bratovic
              Hi Jello, Are you using the licence.dat that installs with HCS12 special edition v5.0? # ##################################################################
              Message 6 of 17 , Feb 12, 2010
              • 0 Attachment
                Hi Jello,
                Are you using the licence.dat that installs with HCS12 special edition v5.0?

                #
                ##################################################################
                #### CW HC12 v5.0 license
                ##################################################################
                #
                INCREMENT Win32_CWIDE_Unlimited metrowks 5.900 permanent uncounted \
                C10A4505A261 VENDOR_STRING="CodeWarrior IDE 4.2 or later, \
                Windows" HOSTID=ANY ck=134 TS_OK
                INCREMENT ProcessorExpertHCS12 metrowks 1.001 permanent uncounted \
                3DBC1127AF17 VENDOR_STRING="Basic \
                beans;1880BA310687F4EDA26BE3E59EB4D4E0" HOSTID=ANY ck=64 TS_OK



                --- In gnu-m68hc11@yahoogroups.com, said jello <sjellouli@...> wrote:
                >
                > I typically write fairly large programs, well beyond the 32 K or even the 64 K advertised at times. And I have NEVER had any issue whatsoever.
                > I have been able to compile, and run, a decent RTOS that is well above 100 K, and CW did not flinch.
                > I dare anybody to tell me what is the code limit on the free (special edition) version of CW. I haven't been able to find that limit yet.
              • said jello
                Yes. I honestly NEVER forked a penny for my tools. Either I get them through work or I use open source stuff. ________________________________ From:
                Message 7 of 17 , Feb 13, 2010
                • 0 Attachment
                  Yes.
                  I honestly NEVER forked a penny for my tools.
                  Either I get them through work or I use open source stuff.



                  From: alex_bratovic <alexbratovic@...>
                  To: gnu-m68hc11@yahoogroups.com
                  Sent: Sat, February 13, 2010 12:41:48 AM
                  Subject: Re: C++, is it possible?

                   



                  Hi Jello,
                  Are you using the licence.dat that installs with HCS12 special edition v5.0?

                  #
                  ############ ######### ######### ######### ######### ######### #########
                  #### CW HC12 v5.0 license
                  ############ ######### ######### ######### ######### ######### #########
                  #
                  INCREMENT Win32_CWIDE_ Unlimited metrowks 5.900 permanent uncounted \
                  C10A4505A261 VENDOR_STRING= "CodeWarrior IDE 4.2 or later, \
                  Windows" HOSTID=ANY ck=134 TS_OK
                  INCREMENT ProcessorExpertHCS1 2 metrowks 1.001 permanent uncounted \
                  3DBC1127AF17 VENDOR_STRING= "Basic \
                  beans;1880BA310687F 4EDA26BE3E59EB4D 4E0" HOSTID=ANY ck=64 TS_OK

                  --- In gnu-m68hc11@ yahoogroups. com, said jello <sjellouli@. ..> wrote:
                  >
                  > I typically write fairly large programs, well beyond the 32 K or even the 64 K advertised at times. And I have NEVER had any issue whatsoever.
                  > I have been able to compile, and run, a decent RTOS that is well above 100 K, and CW did not flinch.
                  > I dare anybody to tell me what is the code limit on the free (special edition) version of CW. I haven't been able to find that limit yet.


                • Mike McCarty
                  ... Open source does not imply free of charge. Isn t this conversation getting OT for the forum? Mike --
                  Message 8 of 17 , Feb 13, 2010
                  • 0 Attachment
                    said jello wrote:
                    > Yes.
                    > I honestly NEVER forked a penny for my tools.
                    > Either I get them through work or I use open source stuff.

                    Open source does not imply free of charge.

                    Isn't this conversation getting OT for the forum?

                    Mike
                    --
                    p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
                    Oppose globalization and One World Governments like the UN.
                    This message made from 100% recycled bits.
                    You have found the bank of Larn.
                    I speak only for myself, and I am unanimous in that!
                  • Keith V
                    Well using your work license doesn t mean there are no more licenses. I just talked to the FAE on Friday and while they have simplified their license structure
                    Message 9 of 17 , Feb 13, 2010
                    • 0 Attachment
                      Well using your work license doesn't mean there are no more licenses.
                      I just talked to the FAE on Friday and while they have simplified their license structure the tools are still not free.

                      GNU tools are not as good, but they are free, as in free beer, but more expensive to use.


                      To: gnu-m68hc11@yahoogroups.com
                      From: sjellouli@...
                      Date: Sat, 13 Feb 2010 06:52:03 -0800
                      Subject: Re: C++, is it possible?

                       

                      Yes.
                      I honestly NEVER forked a penny for my tools.
                      Either I get them through work or I use open source stuff.



                      From: alex_bratovic <alexbratovic@ bratspeed. com>
                      To: gnu-m68hc11@ yahoogroups. com
                      Sent: Sat, February 13, 2010 12:41:48 AM
                      Subject: Re: C++, is it possible?

                       


                      Hi Jello,
                      Are you using the licence.dat that installs with HCS12 special edition v5.0?

                      #
                      ############ ######### ######### ######### ######### ######### #########
                      #### CW HC12 v5.0 license
                      ############ ######### ######### ######### ######### ######### #########
                      #
                      INCREMENT Win32_CWIDE_ Unlimited metrowks 5.900 permanent uncounted \
                      C10A4505A261 VENDOR_STRING= "CodeWarrior IDE 4.2 or later, \
                      Windows" HOSTID=ANY ck=134 TS_OK
                      INCREMENT ProcessorExpertHCS1 2 metrowks 1.001 permanent uncounted \
                      3DBC1127AF17 VENDOR_STRING= "Basic \
                      beans;1880BA310687F 4EDA26BE3E59EB4D 4E0" HOSTID=ANY ck=64 TS_OK

                      --- In gnu-m68hc11@ yahoogroups. com, said jello <sjellouli@. ..> wrote:
                      >
                      > I typically write fairly large programs, well beyond the 32 K or even the 64 K advertised at times. And I have NEVER had any issue whatsoever.
                      > I have been able to compile, and run, a decent RTOS that is well above 100 K, and CW did not flinch.
                      > I dare anybody to tell me what is the code limit on the free (special edition) version of CW. I haven't been able to find that limit yet.






                      Hotmail: Free, trusted and rich email service. Get it now.
                    Your message has been successfully submitted and would be delivered to recipients shortly.