не могу никак заставить работать STLport
От: Аноним  
Дата: 06.10.05 18:09
Оценка:
уж не пинайте пожалуйста, расскажите, что надо сделать что б STLport 5 работал у меня на VC6.0 ??

делаю всё как в мануале, всё компилится, библиотеки в STLport/lib кладуться, в VC подключаю инклюды и либы! Даже компилится всЁ! А вот линковать не хочет:
#include "stdafx.h"
#include <cstdio>
#include <iostream>
#include <string>

int main(int argc, char* argv[])
{
    printf("sdsdsd");
    std::cout<<"DDDDDDDDD"<<std::endl;
    
    std::string s;
    std::cin>>s;    
    return 0;
}

Deleting intermediate files and output files for project '_test2 — Win32 Debug'.
--------------------Configuration: _test2 — Win32 Debug--------------------
Compiling...
StdAfx.cpp
Compiling...
_test2.cpp
Linking...
_test2.obj : error LNK2001: unresolved external symbol "class stlpmtx_std::basic_istream<char,class stlpmtx_std::char_traits<char> > stlpmtx_std::cin" (?cin@stlpmtx_std@@3V?$basic_istream@DV?$char_traits@D@stlpmtx_std@@@1@A)
_test2.obj : error LNK2001: unresolved external symbol "class stlpmtx_std::basic_ostream<char,class stlpmtx_std::char_traits<char> > stlpmtx_std::cout" (?cout@stlpmtx_std@@3V?$basic_ostream@DV?$char_traits@D@stlpmtx_std@@@1@A)
_test2.obj : error LNK2001: unresolved external symbol "private: static void __cdecl stlpmtx_std::D__A<0,0>::_M_deallocate(void *,unsigned int)" (?_M_deallocate@?$D__A@$0A@$0A@@stlpmtx_std@@CAXPAXI@Z)
_test2.obj : error LNK2001: unresolved external symbol "public: __thiscall stlpmtx_std::locale::~locale(void)" (??1locale@stlpmtx_std@@QAE@XZ)
_test2.obj : error LNK2001: unresolved external symbol "public: __thiscall stlpmtx_std::locale::locale(class locale::locale const &)" (??0locale@stlpmtx_std@@QAE@ABV01@@Z)
_test2.obj : error LNK2001: unresolved external symbol "protected: void __thiscall stlpmtx_std::ios_base::_M_throw_failure(void)" (?_M_throw_failure@ios_base@stlpmtx_std@@IAEXXZ)
_test2.obj : error LNK2001: unresolved external symbol "private: static void * __cdecl stlpmtx_std::D__A<0,0>::_M_allocate(unsigned int)" (?_M_allocate@?$D__A@$0A@$0A@@stlpmtx_std@@CAPAXI@Z)
_test2.obj : error LNK2001: unresolved external symbol "void __cdecl stlpmtx_std::__stl_throw_length_error(char const *)" (?__stl_throw_length_error@stlpmtx_std@@YAXPBD@Z)
_test2.obj : error LNK2001: unresolved external symbol "public: class stlpmtx_std::locale::facet * __thiscall stlpmtx_std::locale::_M_use_facet(class stlpmtx_std::locale::id const &)const " (?_M_use_facet@locale@stlpmtx_std@@QBEPAVfacet@12@ABVid@12@
@Z)
_test2.obj : error LNK2001: unresolved external symbol "public: static class stlpmtx_std::locale::id stlpmtx_std::ctype<char>::id" (?id@?$ctype@D@stlpmtx_std@@2V0locale@2@A)
_test2.obj : error LNK2001: unresolved external symbol "public: char const * __thiscall stlpmtx_std::ctype<char>::scan_not(enum stlpmtx_std::ctype_base::mask,char const *,char const *)const " (?scan_not@?$ctype@D@stlpmtx_std@@QBEPBDW4mask@ctype_base
@2@PBD1@Z)
Debug/_test2.exe : fatal error LNK1120: 11 unresolved externals
Error executing link.exe.
Creating browse info file...

_test2.exe — 12 error(s), 0 warning(s)


НУ ЧТО ДЕЛАТЬ?? Я уже целый день ищу информацию, перепробывал разные параметры в stl_user_config.h и _site_config.h менять — ошибки другие появляются, но заставить работать не могу.
Re: не могу никак заставить работать STLport
От: Yess  
Дата: 07.10.05 03:07
Оценка:
Здравствуйте, Аноним, Вы писали:

А>уж не пинайте пожалуйста, расскажите, что надо сделать что б STLport 5 работал у меня на VC6.0 ??


А>делаю всё как в мануале, всё компилится, библиотеки в STLport/lib кладуться, в VC подключаю инклюды и либы! Даже компилится всЁ! А вот линковать не хочет:


Типы библиотек(Single/Multi Thread) у либ и проектов одинаковы ?
Re[2]: не могу никак заставить работать STLport
От: Аноним  
Дата: 07.10.05 06:37
Оценка:
Здравствуйте, Yess, Вы писали:

Y>Типы библиотек(Single/Multi Thread) у либ и проектов одинаковы ?


Подскажи, пожалуйста, где подсмотреть?

я в _site_config.h ставил #define _STLP_USE_DYNAMIC_LIB и #define _STLP_USE_STATIC_LIB — ничего не помогает. В первом случае на 1 ошибку больше.
Текст:
#include "stdafx.h"
#include <string>
using namespace std;

int main(int argc, char* argv[])
{        
    string ad = "eddf";
        
    return 0;
}

#define _STLP_USE_DYNAMIC_LIB

--------------------Configuration: test_stlport — Win32 Debug--------------------
Compiling...
test_stlport.cpp
Linking...
test_stlport.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall stlpxmtx_std::allocator<char>::~allocator<char>(void)" (__imp_??1?$allocator@D@stlpxmtx_std@@QAE@XZ)
test_stlport.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall stlpxmtx_std::allocator<char>::allocator<char>(void)" (__imp_??0?$allocator@D@stlpxmtx_std@@QAE@XZ)
test_stlport.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall stlpxmtx_std::_NoMemT_str<char,class stlpxmtx_std::char_traits<char>,class stlpxmtx_std::allocator<char> >::~_NoMemT_str<char,class stlpxmtx_std::
char_traits<char>,class stlpxmtx_std::allocator<char> >(void)" (__imp_??1?$_NoMemT_str@DV?$char_traits@D@stlpxmtx_std@@V?$allocator@D@2@@stlpxmtx_std@@QAE@XZ)
test_stlport.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: __thiscall stlpxmtx_std::_NoMemT_str<char,class stlpxmtx_std::char_traits<char>,class stlpxmtx_std::allocator<char> >::_NoMemT_str<char,class stlpxmtx_std::c
har_traits<char>,class stlpxmtx_std::allocator<char> >(char const *,class _NoMemT_str<char,class stlpxmtx_std::char_traits<char>,class stlpxmtx_std::allocator<char> >::allocator<char> const &)" (__imp_??0?$_NoMemT_str@DV?$char_traits@D@stlpxmtx_std@
@V?$allocator@D@2@@stlpxmtx_std@@QAE@PBDABV?$allocator@D@1@@Z)
Debug/test_stlport.exe : fatal error LNK1120: 4 unresolved externals
Error executing link.exe.
Creating browse info file...

test_stlport.exe — 5 error(s), 0 warning(s)


#define _STLP_USE_STATIC_LIB:

--------------------Configuration: test_stlport — Win32 Debug--------------------
Compiling...
test_stlport.cpp
Linking...
test_stlport.obj : error LNK2001: unresolved external symbol "private: static void __cdecl stlpmtx_std::D__A<0,0>::_M_deallocate(void *,unsigned int)" (?_M_deallocate@?$D__A@$0A@$0A@@stlpmtx_std@@CAXPAXI@Z)
test_stlport.obj : error LNK2001: unresolved external symbol "private: static void * __cdecl stlpmtx_std::D__A<0,0>::_M_allocate(unsigned int)" (?_M_allocate@?$D__A@$0A@$0A@@stlpmtx_std@@CAPAXI@Z)
test_stlport.obj : error LNK2001: unresolved external symbol "void __cdecl stlpmtx_std::__stl_throw_length_error(char const *)" (?__stl_throw_length_error@stlpmtx_std@@YAXPBD@Z)
Debug/test_stlport.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.
Creating browse info file...

test_stlport.exe — 4 error(s), 0 warning(s)

Re[2]: не могу никак заставить работать STLport
От: Аноним  
Дата: 07.10.05 06:42
Оценка:
Здравствуйте, Yess, Вы писали:

Y>Типы библиотек(Single/Multi Thread) у либ и проектов одинаковы ?


Нашел в _site_config,h только #define _NOTHREADS и #define _STLP_NO_THREADS а про Мульти не нашел ничего
Re[3]: не могу никак заставить работать STLport
От: Сергей Зизев Украина  
Дата: 07.10.05 06:51
Оценка:
Hello, !
You wrote on Fri, 07 Oct 2005 06:37:36 GMT:

> Здравствуйте, Yess, Вы писали:


Y>> Типы библиотек(Single/Multi Thread) у либ и проектов одинаковы ?


> Подскажи, пожалуйста, где подсмотреть?


В свойствах проекта. Про VC6 не помню, в VC7.1 :
Properties -> C++ -> Code Generation -> Runtime Library

Я тебе порекомендовал бы включить у линкера /verbose:lib и помотреть какая
либа stlport'a линкуется и линкуется ли вообще и сделать выводы.

With best regards, Sergey Zizyov. E-mail: ziserg@despammed.com
Posted via RSDN NNTP Server 1.9
Re[3]: не могу никак заставить работать STLport
От: Сергей Зизев Украина  
Дата: 07.10.05 06:54
Оценка:
Hello, !
You wrote on Fri, 07 Oct 2005 06:42:57 GMT:

> Здравствуйте, Yess, Вы писали:


Y>> Типы библиотек(Single/Multi Thread) у либ и проектов одинаковы ?


> Нашел в _site_config,h только #define _NOTHREADS и #define

> _STLP_NO_THREADS а про Мульти не нашел ничего

Mr. Yess, я думаю, не это имел ввиду, а то, с одинаковые ли runtime
библиотеками собирается твой проект.

With best regards, Sergey Zizyov. E-mail: ziserg@despammed.com
Posted via RSDN NNTP Server 1.9
Re[4]: не могу никак заставить работать STLport
От: Аноним  
Дата: 07.10.05 07:00
Оценка:
Здравствуйте, Сергей Зизев, Вы писали:

СЗ>Я тебе порекомендовал бы включить у линкера /verbose:lib и помотреть какая

СЗ>либа stlport'a линкуется и линкуется ли вообще и сделать выводы.

--------------------Configuration: test_stlport — Win32 Debug--------------------
Linking...
Searching Libraries
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\kernel32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\user32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\gdi32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\winspool.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\comdlg32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\advapi32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\shell32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\ole32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\oleaut32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\uuid.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\odbc32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\odbccp32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\LIBCD.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\OLDNAMES.lib:
Searching c:\PROG\STLport\lib\stlport_static_d50.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\libcpd.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\kernel32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\user32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\gdi32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\winspool.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\comdlg32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\advapi32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\shell32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\ole32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\oleaut32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\uuid.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\odbc32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\odbccp32.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\LIBCD.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\OLDNAMES.lib:
Searching c:\PROG\STLport\lib\stlport_static_d50.lib:
Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\libcpd.lib:
Done Searching Libraries
test_stlport.obj : error LNK2001: unresolved external symbol "private: static void __cdecl stlpmtx_std::D__A<0,0>::_M_deallocate(void *,unsigned int)" (?_M_deallocate@?$D__A@$0A@$0A@@stlpmtx_std@@CAXPAXI@Z)
test_stlport.obj : error LNK2001: unresolved external symbol "private: static void * __cdecl stlpmtx_std::D__A<0,0>::_M_allocate(unsigned int)" (?_M_allocate@?$D__A@$0A@$0A@@stlpmtx_std@@CAPAXI@Z)
test_stlport.obj : error LNK2001: unresolved external symbol "void __cdecl stlpmtx_std::__stl_throw_length_error(char const *)" (?__stl_throw_length_error@stlpmtx_std@@YAXPBD@Z)
Debug/test_stlport.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

test_stlport.exe — 4 error(s), 0 warning(s)
Re[4]: не могу никак заставить работать STLport
От: Аноним  
Дата: 07.10.05 07:06
Оценка:
Здравствуйте, Сергей Зизев, Вы писали:

СЗ>В свойствах проекта. Про VC6 не помню, в VC7.1 :

СЗ>Properties -> C++ -> Code Generation -> Runtime Library

УРА!
Properties -> С\C++ -> Code Generation -> Use Runtime Library
поставил Debug Multithread вместо debug singl thread

Скомпилировалось! СПАСИБО ВСЕМ!
Re[5]: не могу никак заставить работать STLport
От: Сергей Зизев Украина  
Дата: 07.10.05 07:19
Оценка:
Hello, !
You wrote on Fri, 07 Oct 2005 07:00:05 GMT:

> Здравствуйте, Сергей Зизев, Вы писали:


СЗ>> Я тебе порекомендовал бы включить у линкера /verbose:lib и помотреть

СЗ>> какая либа stlport'a линкуется и линкуется ли вообще и сделать выводы.

> --------------------Configuration: test_stlport — Win32

> Debug-------------------- Linking...
[skipped...]
> Searching c:\PROG\STLport\lib\stlport_static_d50.lib:
> Searching C:\PROG\Microsoft Visual Studio\VC98\LIB\LIBCD.lib:


Я могу предположить, что приложение у тебя использует Singlethreaded Debug,
в stlport собрано с Multithreaded.
По умолчанию stlport собирается только в Multithreaded и что бы собрать его
с Singlethreaded нужно пошаманить.

With best regards, Sergey Zizyov. E-mail: ziserg@despammed.com
Posted via RSDN NNTP Server 1.9
Re[6]: не могу никак заставить работать STLport
От: Аноним  
Дата: 07.10.05 07:29
Оценка:
Здравствуйте, Сергей Зизев, Вы писали:
СЗ>Я могу предположить, что приложение у тебя использует Singlethreaded Debug,
СЗ>в stlport собрано с Multithreaded.
СЗ>По умолчанию stlport собирается только в Multithreaded и что бы собрать его
СЗ>с Singlethreaded нужно пошаманить.

Да, так и было, спасибо
http://rsdn.ru/Forum/Message.aspx?mid=1423582&amp;only=1
Автор:
Дата: 07.10.05
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.