ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

error C3861: '_T':

8 REPLIES 8
Reply
Message 1 of 9
Anonymous
2023 Views, 8 Replies

error C3861: '_T':

Hello,
I am just new to ObjectARX programming so this question probably is very easy.

I was going through the Step01 sample. I completed all the steps and tried to build but I received 5 error messages that says "error C3861: '_T': identifier not found"

Next I downloaded the completed solution and tried it and it works. I compared my code with the downloaded code and they appear identical. I think it as something to do with unicode, possibly a compiler setting but I do not know. Can anyone help me?
8 REPLIES 8
Message 2 of 9
Anonymous
in reply to: Anonymous

You need to #include "tchar.h" to get this macro definition.

wrote in message news:5584047@discussion.autodesk.com...
Hello,
I am just new to ObjectARX programming so this question probably is very
easy.

I was going through the Step01 sample. I completed all the steps and tried
to build but I received 5 error messages that says "error C3861: '_T':
identifier not found"

Next I downloaded the completed solution and tried it and it works. I
compared my code with the downloaded code and they appear identical. I think
it as something to do with unicode, possibly a compiler setting but I do not
know. Can anyone help me?
Message 3 of 9
Anonymous
in reply to: Anonymous

thanks Art
Message 4 of 9
Lachoserouge
in reply to: Anonymous

Thanks for this information but I have a question about the "_T" meanning.

 

It works when I write :  

acutPrintf(_T("\napplication ObjectARX Minimum chargée!"));

 

I have " application ObjectARX Minimum chargée! " that appears in my command line but I do not understant the meanning of "_T". Also once I saw "_L" and I did not understand either.

Tags (1)
Message 5 of 9
Nick1983
in reply to: Lachoserouge

Lachoserouge, I think it'll be much better for you to learn C++. Smiley Tongue

_T macro or L"" has no relation to ObjectARX.

They tell to compiler that used string data is in unicode format and nothing more.

---
#define QUESTION(b) (2*b)||(!(2*b)) © William Shakespeare
Message 6 of 9
Lachoserouge
in reply to: Anonymous

That's what i'm doing... I'm learning C++ to create ARX objects.Smiley Happy

 

thanks for your help.

Message 7 of 9
Nick1983
in reply to: Lachoserouge

Before creating ARX applications U MUST learn C++. It'll be quite hard to learn C++ and ObjectARX at the same time.

---
#define QUESTION(b) (2*b)||(!(2*b)) © William Shakespeare
Message 8 of 9
fenton.webb
in reply to: Nick1983

Actually, the _T() is a #define which defines the C++ 'L' prefix to strings when the compiler project is set to use the Unicode double byte character set. It enables you to define text as normal MBCS or UNICODE in the same source file.

 

This is particularily useful if you want your same code to work on all AutoCAD versions...

 

AutoCAD < 2007 = MBCS

AutoCAD >= 2007 = UNICODE

 

We have a tool called Teefy which automatically converts your code to use the TCHAR defines, and thus easily makes your code work for both string types, attached.

 

It currently only works for Visual Studio 2002 (install the 2003 version and then run the reg file), 2003 and 2005 so you will need those to run it. Due to file attachment size restrictions, I've attached the 2005 version here for you.

 

Fenton Webb

Autodesk Developer Network




Fenton Webb
AutoCAD Engineering
Autodesk

Tags (2)
Message 9 of 9
fenton.webb
in reply to: fenton.webb

Here's the Visual Studio 2003 version with the 2002 reg file.

 

Fenton Webb

Autodesk Developer Network




Fenton Webb
AutoCAD Engineering
Autodesk

Tags (2)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost