Click here to Skip to main content
15,886,799 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello,

I have visual studio 2010.
I have a .tlb file in my Thirdpart directory, and I want to import it.

I looked on another project, and it's imported like this:

#import "mytlb.tlb" no_namespace named_guids raw_interfaces_only
and it compiles fine in other prjects.

In my project, when I add this #import line, compile fails and I get the following error:

error C2220: warning treated as error - no 'object' file generated

What can be the reason? What should I do to make it compile fine?

Thanks
Posted
Comments
Richard MacCutchan 13-Nov-11 7:45am    
Show the line(s) of code where the error occurs; we cannot see your screen.
Andrew Brock 14-Nov-11 6:30am    
It seems a bit silly, but is the compiler able to find the .tlb file?

1 solution

try adding .tlb into your project by properties->add-> add existing then choose it. dont remove #import and try to compile
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900