tli file syntax errors

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?
LVL 1
emily_hallAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

ikeworkCommented:
sounds like a c# - question, you better ask it in the c# - area ....
0
emily_hallAuthor Commented:
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
emily_hallAuthor Commented:
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
CetusMODCommented:
Closed, 250 points refunded.
CetusMOD
Community Support Moderator
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.