🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
6 messages
6 total messages Started by 4N Fri, 14 Mar 2008 10:37
ILINK32 Error: _GetDiagGroupDef()
#481
Author: 4N
Date: Fri, 14 Mar 2008 10:37
18 lines
1387 bytes
Hi,
I tried to use TRACE under C++2007 but the following error showed up:

[ILINK32 Error] Error: Unresolved external '_GetDiagGroupDef()' referenced 
from ...

what libray have I to link to my project?

Remark:
I solved this adding checks.cpp to my project but I got the following error:
[BCC32 Error] checks.cpp(66): E2342 Type mismatch in parameter 
'lpOutputString' (wanted 'const wchar_t *',
 got 'const char *')
problem due to the global _UNICODE define
so I had to MODIFY checks.cpp !?!?!? replacing OutputDebugString with 
OutputDebugStringA !?!?!?

any idea?
Re: ILINK32 Error: _GetDiagGroupDef()
#482
Author: Darko Miletic
Date: Fri, 14 Mar 2008 12:55
27 lines
2109 bytes
4N wrote:
> Hi,
> I tried to use TRACE under C++2007 but the following error showed up:
> 
> [ILINK32 Error] Error: Unresolved external '_GetDiagGroupDef()' referenced 
> from ...
> 
> what libray have I to link to my project?
> 
> Remark:
> I solved this adding checks.cpp to my project but I got the following error:
> [BCC32 Error] checks.cpp(66): E2342 Type mismatch in parameter 
> 'lpOutputString' (wanted 'const wchar_t *',
>  got 'const char *')
> problem due to the global _UNICODE define
> so I had to MODIFY checks.cpp !?!?!? replacing OutputDebugString with 
> OutputDebugStringA !?!?!?

It is a strange thing. The same thing happens with Turbo C++ (BDS 2006). 
Aparently somebody forgot to add that file to RTL. I'll do additional 
check during weekend and report the findings.

You can continue using TRACE with your patch or you can try traceStream 
class that supports both ANSI and UNICODE and offers STL streams for 
debugging output.

http://www.torry.net/net/nettools/streams/traceStream.zip
Re: ILINK32 Error: _GetDiagGroupDef()
#484
Author: Ed Mulroy [TeamB]
Date: Fri, 14 Mar 2008 14:27
14 lines
1474 bytes
That is a puzzle.

I did a  grep -d  on all files in the [Compiler Base Dir]\include directory 
tree.  No GetDiagGroupDef was found anywhere in BCB6 or BDS2007.  What 
header file is that in?

.  Ed

> Darko Miletic wrote in message
> news:47da75db$1@newsgroups.borland.com...
>
> It is a strange thing. The same thing happens with Turbo C++ (BDS 2006). 
> Aparently somebody forgot to add that file to RTL. I'll do additional 
> check during weekend and report the findings.  ...
Re: ILINK32 Error: _GetDiagGroupDef()
#485
Author: Darko Miletic
Date: Fri, 14 Mar 2008 15:12
25 lines
1957 bytes
Ed Mulroy [TeamB] wrote:
> That is a puzzle.
> 
> I did a  grep -d  on all files in the [Compiler Base Dir]\include directory 
> tree.  No GetDiagGroupDef was found anywhere in BCB6 or BDS2007.  What 
> header file is that in?
> 
> ..  Ed
> 

It is located in checks.h, declared as macro DECLARE_DIAG_GROUP

#define DECLARE_DIAG_GROUP(g, qual) TDiagGroup & qual _GetDiagGroup##g()

#define DIAG_DECLARE_GROUP(g)  DECLARE_DIAG_GROUP(g,DIAG_IMPORT);
#define DIAG_DEFINE_GROUP(g, e, l) \
     DECLARE_DIAG_GROUP(g, DIAG_EXPORT); \
     TDiagGroup &_GetDiagGroup##g() \
     { \
         static TDiagGroup dg(e, l, #g); \
         return dg; \
     } \

Other part of the code is in
<BDS root>\source\cpprtl\Source\misc\checks.cpp
Re: ILINK32 Error: _GetDiagGroupDef()
#487
Author: Ed Mulroy [TeamB]
Date: Fri, 14 Mar 2008 19:53
26 lines
1890 bytes
Thanks.

I missed it because it doesn't have a regular function prototype in the 
headers but is assembled with a string pasting macro so grep couldn't find 
it.

.  Ed

> Darko Miletic wrote in message
> news:47da95fe$1@newsgroups.borland.com...
>
> It is located in checks.h, declared as macro DECLARE_DIAG_GROUP
>
> #define DECLARE_DIAG_GROUP(g, qual) TDiagGroup & qual _GetDiagGroup##g()
>
> #define DIAG_DECLARE_GROUP(g)  DECLARE_DIAG_GROUP(g,DIAG_IMPORT);
> #define DIAG_DEFINE_GROUP(g, e, l) \
>     DECLARE_DIAG_GROUP(g, DIAG_EXPORT); \
>     TDiagGroup &_GetDiagGroup##g() \
>     { \
>         static TDiagGroup dg(e, l, #g); \
>         return dg; \
>     } \
>
> Other part of the code is in
> <BDS root>\source\cpprtl\Source\misc\checks.cpp
Re: ILINK32 Error: _GetDiagGroupDef()
#488
Author: 4N
Date: Sat, 15 Mar 2008 00:18
10 lines
1326 bytes
> It is a strange thing. The same thing happens with Turbo C++ (BDS 2006). 
> Aparently somebody forgot to add that file to RTL. I'll do additional 
> check during weekend and report the findings.
>
> You can continue using TRACE with your patch or you can try traceStream 
> class that supports both ANSI and UNICODE and offers STL streams for 
> debugging output.
> http://www.torry.net/net/nettools/streams/traceStream.zip

thanks a lot 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads