Главная страница | назад





Article #16785: Errno, BC5.02, and C++Builder

 Question and Answer Database

FAQ1785C.txt   Errno, BC5.02, and C++Builder 
Category   :IDE
Platform    :All
Product    :C++Builder  1.x

Question:
I've created this static library in BC++ 5.0,
and i'm trying to use it in C++Builder, but
i'm getting linker errors regarding _errno. Why?
Shouldn't this be the same in both products? 

Answer:
At first glance, it seems like it should. But
if you look at the header file, you will see
that _errno is _different_ depending on whether
or not _MT is defined. This is because the default
errno is not thread-safe, and the one provided
when _MT (which determines whether the compiler
should use the multi-threaded or non-multi-threaded
versions of the RTL) is defined is.

The defaults for this compiler define vary between
BC++ 5.02 and BC++Builder. Thus, you cannot link;
the symbol is different.

You need to rebuild your .lib in BC++ 5.02
_with _MT defined._
 

7/2/98 10:32:32 AM
 

Last Modified: 01-SEP-99