-
August 6th, 2011, 12:18 PM
#1
add clr support to ATL project
Hello,
I created a ATL/COM c++ project and I tried to add clr support to this. Unfortunately I run into some linker errors here.
I'll explain shortly what I did so maybe someone can can tell me how to solve this. I am using VS2005.
First I created a ATL project (dll) with the wizard. Everything default, nothing special. After that I removed the proxy/stub project, because I don't need it. Then I added a Simple ATL object to the class. I built it and it worked.
Then I added clr support to the project. After the build I got the linker error:
Command line error D8045 : cannot compile C file '.\TestATLProject_i.c' with the /clr option
so I entered the properties of that generated file and chose the option "Compile as C++ Code (/TP)"
After the next build the previous error was gone but I get the following new linker errors and I don't know how to handle this:
1>AtlTestClass.obj : error LNK2020: unresolved token (0A00004A) LIBID_TestATLProjectLib
1>TestATLProject.obj : error LNK2020: unresolved token (0A000064) LIBID_TestATLProjectLib
1>AtlTestClass.obj : error LNK2020: unresolved token (0A00004B) IID_IAtlTestClass
1>TestATLProject.obj : error LNK2001: unresolved external symbol _LIBID_TestATLProjectLib
1>AtlTestClass.obj : error LNK2001: unresolved external symbol _LIBID_TestATLProjectLib
1>AtlTestClass.obj : error LNK2001: unresolved external symbol _IID_IAtlTestClass
I would appreciate if anyone can tell me how to deal with this.
Best regards
Last edited by Makiman; August 7th, 2011 at 01:00 AM.
-
August 6th, 2011, 05:46 PM
#2
Re: add clr support to ATL project
cannot compile C file ... with the /clr option doesn't it say it all?
-
August 6th, 2011, 06:47 PM
#3
Re: add clr support to ATL project
What are you trying to accomplish by building ATL with clr?
-
August 7th, 2011, 12:55 AM
#4
Re: add clr support to ATL project
I would like to have a COM dll which can use managed and unmanaged libraries. And not only exported c style functions via P/Invoke.
-
August 7th, 2011, 08:43 AM
#5
Re: add clr support to ATL project
now I created a COM dll without the wizard like here:
http://msdn.microsoft.com/en-US/libr...(v=VS.80).aspx
And it worked immediately with clr support!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|