Builing DLL and getting error PRJ0019 and warnings LNK4222

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP



Builing DLL and getting error PRJ0019 and warnings LNK4222



In my DLL defs file I had:


EXPORTS
DllCanUnloadNow @1 PRIVATE
DllGetClassObject @2 PRIVATE
DllRegisterServer @3 PRIVATE
DllUnregisterServer @4 PRIVATE



If I build it, I get 4 warnings LNK4222, exported symbol 'DllCanUnloadNow' should not be assigned an ordinal, I get this for each entry.



So I commented out each link with ;



Now when I build I get:


error PRJ0019: A tool returned an error code from "Performing registration"



What is the correct way to resolve both issues?





Just remove @1, @2 ... as shown here: msdn.microsoft.com/en-us/library/8e705t74.aspx
– Alex F
Aug 8 at 10:36


@1


@2





Thank you, although the actual fix was just to remove the @# leaving in the PRIVATE as without it another warning is produced.
– SPlatten
Aug 8 at 10:39




1 Answer
1



Thank you to Alex P, the actual fix was to replace with:


EXPORTS
DllCanUnloadNow PRIVATE
DllGetClassObject PRIVATE
DllRegisterServer PRIVATE
DllUnregisterServer PRIVATE






By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Firebase Auth - with Email and Password - Check user already registered

Dynamically update html content plain JS

How to determine optimal route across keyboard