Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. STL program

STL program

Scheduled Pinned Locked Moved C / C++ / MFC
c++linuxquestion
8 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • O Offline
    O Offline
    Orbital
    wrote on last edited by
    #1

    It's there someone that know how can I compile a program that uses STL on an LINUX system ( I have gcc 2.96 and it seams that it never heard about STL :) ) Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

    C M 2 Replies Last reply
    0
    • O Orbital

      It's there someone that know how can I compile a program that uses STL on an LINUX system ( I have gcc 2.96 and it seams that it never heard about STL :) ) Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      If your compiler is so out of date as to not provide STL, try www.stlport.com, they may have a version compatile with your (non-C++) compiler. Christian The tragedy of cyberspace - that so much can travel so far, and yet mean so little. And you don't spend much time with the opposite sex working day and night, unless the pizza delivery person happens to be young, cute, single and female. I can assure you, I've consumed more than a programmer's allotment of pizza, and these conditions have never aligned. - Christopher Duncan - 18/04/2002

      1 Reply Last reply
      0
      • O Orbital

        It's there someone that know how can I compile a program that uses STL on an LINUX system ( I have gcc 2.96 and it seams that it never heard about STL :) ) Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

        M Offline
        M Offline
        markkuk
        wrote on last edited by
        #3

        Invoke the compiler as g++ instead of gcc. Make sure you have the gcc-c++ and libstdc++-devel packages installed.

        O 1 Reply Last reply
        0
        • M markkuk

          Invoke the compiler as g++ instead of gcc. Make sure you have the gcc-c++ and libstdc++-devel packages installed.

          O Offline
          O Offline
          Orbital
          wrote on last edited by
          #4

          Thanx a lot man ... the g++ work ... but can you tel me the diference betwen gcc and g++?? Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

          N M 2 Replies Last reply
          0
          • O Orbital

            Thanx a lot man ... the g++ work ... but can you tel me the diference betwen gcc and g++?? Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

            N Offline
            N Offline
            Nish Nishant
            wrote on last edited by
            #5

            gcc is the GNU C compiler g++ is the GNU C++ compiler stl is C++ and not C Nish


            Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

            O 1 Reply Last reply
            0
            • O Orbital

              Thanx a lot man ... the g++ work ... but can you tel me the diference betwen gcc and g++?? Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

              M Offline
              M Offline
              markkuk
              wrote on last edited by
              #6

              When you compile and link with g++, you get the C++ libraries linked in as default. If you use ld or gcc, you must manually include the C++ libraries.

              1 Reply Last reply
              0
              • N Nish Nishant

                gcc is the GNU C compiler g++ is the GNU C++ compiler stl is C++ and not C Nish


                Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

                O Offline
                O Offline
                Orbital
                wrote on last edited by
                #7

                I've compiled with gcc programs in C++ ... but it seams that gcc dosen't know templates Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

                N 1 Reply Last reply
                0
                • O Orbital

                  I've compiled with gcc programs in C++ ... but it seams that gcc dosen't know templates Bye, Orbital^ ...the night is long ... but not long enought to do some real coding ...

                  N Offline
                  N Offline
                  Nish Nishant
                  wrote on last edited by
                  #8

                  Orbital^ wrote: I've compiled with gcc programs in C++ ... but it seams that gcc dosen't know templates I just checked out the man pages. Apparently they are eboth same except for this difference :-

                  gcc assumes preprocessed (.i) files are C and assumes C
                  style linking.

                  g++ assumes preprocessed (.i) files are C++ and assumes
                  C++ style linking.

                  Nish


                  Regards, Nish Native CPian. Born and brought up on CP. With the CP blood in him.

                  1 Reply Last reply
                  0
                  Reply
                  • Reply as topic
                  Log in to reply
                  • Oldest to Newest
                  • Newest to Oldest
                  • Most Votes


                  • Login

                  • Don't have an account? Register

                  • Login or register to search.
                  • First post
                    Last post
                  0
                  • Categories
                  • Recent
                  • Tags
                  • Popular
                  • World
                  • Users
                  • Groups