STLport with Mingw

This is a discussion on STLport with Mingw within the Tech Board forums, part of the Community Boards category; I've been trying to install STL with my Mingw compiler but I can't get the iostreams to work, other programs ...

  1. #1
    Registered User
    Join Date
    Oct 2006
    Location
    Brazil
    Posts
    13

    Arrow STLport with Mingw

    I've been trying to install STL with my Mingw compiler but I can't get the iostreams to work, other programs that uses the STL but not iostreams compiles succesfully using the STLport (I already added the STLport\stlport to the compiler's path, of course), I already compiled succesfully the libraries and added the STLport\lib dir succesfully to linker paths in CodeBlocks and even tried to make it link all of the library files in STLport\lib, but the log gives an error like this:

    Code:
    Compiling: C:\Documents and Settings\****\Meus documentos\temp.cpp
    Linking console executable: C:\Documents and Settings\****\Meus documentos\temp.exe
    C:\Documents and Settings\****\Meus documentos\temp.o:temp.cpp:(.text+0xdc): undefined reference to `stlpmtx_std::cout'
    C:\Documents and Settings\****\Meus documentos\temp.o:temp.cpp:(.text$_ZN11stlpmtx_std8ios_base23_M_check_exception_maskEv[stlpmtx_std::ios_base::_M_check_exception_mask()]+0x1d): undefined reference to `stlpmtx_std::ios_base::_M_throw_failure()'
    collect2: ld returned 1 exit status
    Thanks for any help,
    Etinin

  2. #2
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    I recieved some very similar errors awhile back. Different namespace, but same concept.

    Unicode in MinGW
    http://sourceforge.net/forum/forum.p...orum_id=490891

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  3. #3
    Registered User
    Join Date
    Oct 2006
    Location
    Brazil
    Posts
    13
    Did you find out how to fix the problem, Tonto?
    I didn't find any solution in the threads you mencioned

    Thanks for the help,
    Etinin

  4. #4
    (?<!re)tired Mario F.'s Avatar
    Join Date
    May 2006
    Location
    Portugal
    Posts
    7,435
    Define this macro _STLP_USE_STATIC_LIB and let us know if you can now link correctly
    The programmer’s wife tells him: “Run to the store and pick up a loaf of bread. If they have eggs, get a dozen.”
    The programmer comes home with 12 loaves of bread.


    Originally Posted by brewbuck:
    Reimplementing a large system in another language to get a 25% performance boost is nonsense. It would be cheaper to just get a computer which is 25% faster.

  5. #5
    Registered User
    Join Date
    Oct 2006
    Location
    Brazil
    Posts
    13
    Thanks a lot, it's working now!!
    For some strange reason when I tried if before it didn't work, but I tried again now and it worked.

    Code:
    C:\Documents and Settings\****\Meus documentos>g++ -mthreads -IC:\mingw
    \stlport\stlport temp.cpp -LC:\mingw\stlport\bin\ -lstlport.5.0.dll
    Info: resolving stlp_std::cout      by linking to __imp___ZN8stlp_std4coutE (aut
    o-import)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Mingw and elcipse HELP
    By Rob4226 in forum Windows Programming
    Replies: 1
    Last Post: 03-04-2008, 12:35 AM
  2. Integrating Boost with STLPort
    By Mario F. in forum Tech Board
    Replies: 1
    Last Post: 11-11-2006, 05:49 AM
  3. STLport with MingW - Long Long error on project build
    By Mario F. in forum C++ Programming
    Replies: 2
    Last Post: 08-21-2006, 08:55 AM
  4. Free compiler for commercial development? (mingw?)
    By kook44 in forum Windows Programming
    Replies: 8
    Last Post: 01-07-2006, 08:32 AM
  5. compiling mingw to enable timeSetEvent
    By underthesun in forum Windows Programming
    Replies: 2
    Last Post: 02-02-2005, 05:00 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21