Simon Alford

Hi I have been folowing the instruction at on converting to compiling with the /cli option. I have a solution with many projects creating dlls.

Using the /cli compile flag to each project went very well in the compile stage showing no errors.

The at the link stage it has caused many issues. There are LNK2028, LNK2019 and LNK2001 errors for all symbols expored from the dlls. I don't understand this as I have not changed the linker options.

The document at does not give a solution to this issue.

Every thing compiles and links fine if I remove the /cli flag.
Projects were originaly imported from VS 6 into VS 2005

Any on have any ideas what is wrong Why can't the linker find the exports from the DLL as it does when compiled without /cli.

Thanks in advance.

Re: Visual C++ General LNK2028, LNK2019 and LNK2001 errors when using /cli to compile old projects

Simon Alford

If any one is interested i found the reason for this and the fix was simple.

Just had to manualy add the .libs for each .dll to the "additional dependencies" linker property and include the path to the directories that contain the .lib files in the "addtional libary directorys" linker property.

I still have no idea why they are not included automaticaly when i switch to using the /clr flag

Anyway it works now!