[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

tli file syntax errors

Posted on 2004-12-01
5
Medium Priority
?
743 Views
Last Modified: 2008-02-01
I have a C++ file and it imports from a C# library like this:

#import "myLib.tlb"
using namespace myLib;

When I compile I get tons of syntx errors in the tli file - this is a file that is automatically generated right?

error C2059: syntax error : '::'
error C2059: syntax error : 'constant'
error C2143: syntax error : missing ';' before '::'
error C2143: syntax error : missing ';' before '{'
error C2238: unexpected token(s) preceding ';'
error C2447: '{' : missing function header (old-style formal list?)
error C2589: 'constant' : illegal token on right side of '::'
warning C4091: 'inline ' : ignored on left of 'long' when no variable is declared
warning C4278: 'WM_USER': identifier in type library 'myLib.tlb' is already a macro; use the 'rename' qualifier

any ideas?
0
Comment
Question by:emily_hall
  • 2
4 Comments
 
LVL 20

Expert Comment

by:ikework
ID: 12719248
sounds like a c# - question, you better ask it in the c# - area ....
0
 
LVL 1

Author Comment

by:emily_hall
ID: 12719331
My automatically generated C++ code is what is not compiling.  Using my C# library from my other application which is in VB.NET has never given me any problems.

I think the problem lies with the way I import the library in C++...

 

0
 
LVL 1

Author Comment

by:emily_hall
ID: 12719647
I found the problem - had a function called WM_USER() in the C# library which C++ did not like.  Changed the name and all is well.
0
 

Accepted Solution

by:
CetusMOD earned 0 total points
ID: 12748159
Closed, 250 points refunded.
CetusMOD
Community Support Moderator
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will be introduced to the member functions push_back and pop_back of the vector class. The video will teach the difference between the two as well as how to use each one along with its functionality.
Suggested Courses

872 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question