-1

I have an SDK for some Hardware I need to implement
I use The MFC Class they provide and created a windows console application. They heavily rely on the Trace Macro so i cant simply comment them out.

  • I already manually installed the ATL + MFC Component for visual C++

  • I installed the 2015 Compiler (as i read they changed something ...)

  • I disabled precompiled headers

  • I tried "switching" some options in Project properties, but that did not yield anything different :(

    TRACE(_T("PS10DLL not found\n"));

I would expect to compile smoothly but the Error (they used it alot) is:
error C3861: "TRACE": Identifier was not found.

Nimantha
  • 6,405
  • 6
  • 28
  • 69
  • 3
    According to [this page](https://learn.microsoft.com/en-us/previous-versions/6w95a4ha(v=vs.140)) you need to include the afx.h header file – john Aug 12 '19 at 12:51

1 Answers1

0

According to your issue, you are creating a windows console application? TRACE is used in the MFC support program and cannot be used in the WIN32 Application program.

TRACE is a definition in MFC. In Win32 code, you can directly use OutputDebugString to achieve the same effect.

I suggest you could refer to the link: How can I use the TRACE macro in non-MFC projects?

Nimantha
  • 6,405
  • 6
  • 28
  • 69
Jeaninez - MSFT
  • 3,210
  • 1
  • 5
  • 20