CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #1
    Join Date
    May 2010
    Posts
    20

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured