Thread: STLport with Mingw

  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.

    http://cboard.cprogramming.com/showthread.php?t=82485
    http://sourceforge.net/forum/forum.p...orum_id=490891

  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
    Ireland
    Posts
    8,446
    Define this macro _STLP_USE_STATIC_LIB and let us know if you can now link correctly
    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, 01:35 AM
  2. Integrating Boost with STLPort
    By Mario F. in forum Tech Board
    Replies: 1
    Last Post: 11-11-2006, 06: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, 09:32 AM
  5. compiling mingw to enable timeSetEvent
    By underthesun in forum Windows Programming
    Replies: 2
    Last Post: 02-02-2005, 06:00 PM