type_info is not a member of stlpmtx_std
Brought to you by:
complement
The following sample program, gives an error on compilaton with CodeGear Turbo Explorer 2006. The error is: "type_info is not a member of stlpmtx_std".
#include <typeinfo>
class A {};
int main()
{
const std::type_info& ti = typeid(A);
return 0;
}
Using STLPort 5.1.3
Logged In: YES
user_id=615813
Originator: NO
CodeGear Turbo Explorer 2006: what about compiler name? What OS name? What result of original build of library and unit tests? I.e. see http://stlport.sourceforge.net/BugReport.shtml
Logged In: YES
user_id=1512556
Originator: YES
> what about compiler name?
I assumed you know. Sorry. I hope __BORLANDC__ = 0x582 is the "compiler name" you are asking for. It's a free download (www.codegear.com).
> What OS name?
From the above it follows that OS=WIN32
> unit tests?
The output of the unit tests is attatched.
File Added: out.zip
Output of unit test
Logged In: YES
user_id=615813
Originator: NO
Check the compiler's options you compile you test case and compare with compiler's options from unit tests builds. STLport compiled (by default) with threads support, while you not.
Reopen this ticket in case of problem remains.
Logged In: YES
user_id=1512556
Originator: YES
To be sure that there is no change in compiler options, I added the following lines in "test/unit/typeinfo_header_test.cpp" file:
<code>
namespace
{
class A {};
void useless_function() { const std::type_info& ti = typeid(A); }
};
</code>
and tried to recompile the unit tests. It stoped in this modified file. Only this time the message is:
'type_info' is not a member of stlp_std
Logged In: YES
user_id=1096600
Originator: NO
Sorry but I haven't been able to reproduce this problem with Borland C++ compiler 5.1.1 (the free compiler). There is however a major info missing, what is the STLport library version you are testing ? Personally, I have done the test with SVN trunk.
Logged In: YES
user_id=1512556
Originator: YES
I haven't tested it with Borland C++ compiler 5.5.1 (I suppose you meant 5.5.1 and not 5.1.1) but with 5.6.4 (C++Builder 6) and it compiles fine. The problem is with Turbo C++ 2006 Explorer (compiler version 5.8.2). You can download it from www.codegear.com (it's free). The STLPort version I was using, as stated in the original post, is 5.1.3 (downloaded the zip file).
Logged In: YES
user_id=1096600
Originator: NO
I have finally been able to reproduce but only when RTTI support has been disabled. In trunk version we now detect RTTI support using Borland so I have added a #error in typeinfo to make this situation more clear. If you could confirm that you had disable rtti support or that your compiler had not support for it it would be great.
Logged In: YES
user_id=1096600
Originator: NO
Modification: in SVN trunk, support of rtti and availability of type_info are different things. So no rtti support do not mean that native typeinfo won't be included anymore and you should see type_info in STLport namespace again.
Logged In: YES
user_id=1512556
Originator: YES
RTTI support was not disabled. I compiled STLport as is. The commands are:
cd <STLport dir>\build\lib
mingw32-make -fbcc.mak install
One small change I have made is that I added the -Ve option to the compiler.
So in <STLport dir>\build\Makefiles\gmake\bcc.mak
CFLAGS = -q -ff -Ve
CXXFLAGS = -q -ff -Ve
To compile the tests:
cd <STLport dir>\build\test\unit
mingw32-make -fbcc.mak install
To reproduce the error add the code I posted some time ago in <STLport dir>\test\unit\typeinfo_header_test.cpp
Have you applied available updates-patches to the compiler?
I can test the SVN trunk if you wish.
I also can sent you two IDE projects (single-threaded and multi-threaded) builds to reproduce the problem.
Logged In: YES
user_id=1096600
Originator: NO
I only have free Borland compiler installed and I am not very interested in installing more. I prefer to let people like you contribute to the project reporting specific issues, otherwise I could spend all my time installing new tools...
Checking latest SVN trunk would be very interested indeed. But as I have some Borland fixes on my local host that I will commit this evening it would be better if you get this trunk state tomorrow so that I do not ask you to check again later.
Bests