error LNK2001: unresolved external symbol 
Author Message
 error LNK2001: unresolved external symbol

Hi,

I'm working with a project that have multiple ATL servers as
subprojects. I have defined a C++ class (non-COM) in one of the ATL
COM servers and need to use a reference to an instance of that class
in another ATL COM server. I include the header file of the C++ class
wherever an instance of that class is used. When building the project
containing the C++ class everything builds fine. When I go to build
the project that uses the C++ class I get unresolved external symbol
errors for almost all the functions defined in the class. I even tried
to add the project as a dependency to no avail. With this rather
simple problem presentation, can anyone spot what am I doing wrong or
what am I missing?

Thanks!

Best Regards,
Thor



Wed, 07 Jul 2004 02:17:15 GMT  
 error LNK2001: unresolved external symbol
Looks like you are either  missing the .lib for the dll containing your C++
code or you need to include the C++ source in the project with the
unresolved externals.

I would argue against exposing C++ classes in DLLs as you quickly can run
into versioning issues. I would either turn it into a COM or include the
code directly.

Dirk


Quote:
> Hi,

> I'm working with a project that have multiple ATL servers as
> subprojects. I have defined a C++ class (non-COM) in one of the ATL
> COM servers and need to use a reference to an instance of that class
> in another ATL COM server. I include the header file of the C++ class
> wherever an instance of that class is used. When building the project
> containing the C++ class everything builds fine. When I go to build
> the project that uses the C++ class I get unresolved external symbol
> errors for almost all the functions defined in the class. I even tried
> to add the project as a dependency to no avail. With this rather
> simple problem presentation, can anyone spot what am I doing wrong or
> what am I missing?

> Thanks!

> Best Regards,
> Thor



Wed, 07 Jul 2004 02:44:07 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. PxSQLScript.obj : error LNK2001: unresolved external symbol "class ATL::CTraceCa

2. error LNK2001: unresolved external symbol _ntohl@4

3. error LNK2001: unresolved external symbol _IID_ICategorizeProperties

4. error LNK2001: Unresolved external Symbol _IID__Class1

5. Linking Problem when trying to create ReleaseUMinDependency[error LNK2001: unresolved external symbol _main]

6. error LNK2001: unresolved external symbol _main

7. error LNK2001: unresolved external symbol

8. release build error LNK2001: unresolved external symbol _main

9. error LNK2001: unresolved external symbol _IID_IApplicationObject

10. Anyone knows error LNK2001: unresolved external symbol __imp__CoGetObjectContext@8

11. error LNK2001: unresolved external symbol _WinMain@16

12. newbie: error LNK2001: unresolved external symbol __endthreadex

 

 
Powered by phpBB® Forum Software