проблемы с stlport. помогите пожалуйста.
От: _Winnie Россия C++.freerun
Дата: 22.06.04 21:12
Оценка:
собирал я его так: вызвал консоль Visual Studio .NET 2003 Command Prompt, и набрал "nmake vc71.mak". Все собралось, все замечательно... но...

stlport_vc71_static.lib
stlport_vc71_stldebug_static.lib
stlport_vc71.lib
stlport_vc71_stldebug.lib

Я ожидал что-то вроде

stlport_vc71_static_mt.lib
stlport_vc71_static_st.lib
stlport_vc71_stldebug_static_mt.lib
stlport_vc71_stldebug_static_st.lib
stlport_vc71.lib
stlport_vc71_stldebug.lib

Получается что, что я не могу использовать на своем компьютере линковку одновременно и с mt-rtl и с sl-rtl?!! (в разных проектах, конечно).
(по умолчания stlport-либы используют multi-threaded runtime library. Поэтому еще такой вопрос: как собрать так, что бы использовалась single-threaded?)

имхо, корень зла в файле stl_select_lib.h
# if !defined (_STLP_NO_OWN_IOSTREAMS)

#  if ! defined (_STLP_LIB_STATIC_SUFFIX)
#   define _STLP_LIB_STATIC_SUFFIX ""
#  endif

// Note : the code below is intended to make use of compiled
// STLport iostreams easier. If you are with to change names used for
// STLport libraries , please also change RELEASE_NAME and DEBUG_NAME
// macros in makefile ../../src/vc6.mak (or whatever .mak you are using to build
// STLport). If you are using binaries, you may just rename the binaries.
#    if ! defined (__BUILDING_STLPORT) && ! defined (_STLP_DONT_FORCE_MSVC_LIB_NAME)
#     if defined (_STLP_USE_DECLSPEC)
#      ifdef _STLP_DEBUG
#       pragma comment(lib, _STLP_LIB_BASENAME"_stldebug.lib")
#      elif (defined (_DEBUG) || defined (__DEBUG)) && defined (_STLP_USE_DEBUG_LIB)
#       pragma comment(lib, _STLP_LIB_BASENAME"_debug.lib")
#      else
#       pragma comment(lib, _STLP_LIB_BASENAME".lib")
#      endif
#     else /* _STLP_USE_DECLSPEC */
// fbp : for static linking, debug setting _MUST_ correspond to what
// has been compiled into binary lib
#      ifdef _STLP_DEBUG
#       if (! defined (_DEBUG))
#        error "For static link with STLport library, _DEBUG setting MUST be on when _STLP_DEBUG is on. (/MTd forces _DEBUG)"
#       endif
#       pragma comment(lib, _STLP_LIB_BASENAME"_stldebug"_STLP_LIB_STATIC_SUFFIX".lib")
#      elif (defined (_DEBUG) || defined (__DEBUG)) && defined (_STLP_USE_DEBUG_LIB)
#       pragma comment(lib, _STLP_LIB_BASENAME"_debug"_STLP_LIB_STATIC_SUFFIX".lib")
#      else
#       pragma comment(lib, _STLP_LIB_BASENAME""_STLP_LIB_STATIC_SUFFIX".lib")
#      endif
#     endif /* _STLP_USE_DECLSPEC */
#    endif /* __BUILDING_STLPORT */
#   endif /* _STLP_OWN_IOSTREAMS */



Вот, еще и такой вопрос. Откуда могут быть такие варнинги, если vc70 даже близко не лежал на моей машине? (билдил я, как уже сказал, в vs2003)


Linking...
stlport_vc71_static.lib(dll_main.obj) : warning LNK4204: 'e:\Projects\test\Release\vc70.pdb' is missing debugging information for referencing module; linking object as if no debug info
stlport_vc71_static.lib(fstream.obj) : warning LNK4204: 'e:\Projects\test\Release\vc70.pdb' is missing debugging information for referencing module; linking object as if no debug info
stlport_vc71_static.lib(ios.obj) : warning LNK4204: 'e:\Projects\test\Release\vc70.pdb' is missing debugging information for referencing module; linking object as if no debug info

и еще пара десятков таких. ОЧЕНЬ РАЗДРАЖАЕТ.


Build Time 0:01
Правильно работающая программа — просто частный случай Undefined Behavior
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.