   [C++] How do I correct this: warning LNK4221: no public symbols found ...  ?
  I get this warning on some .obj files, or even whole .lib projects:warning LNK4221: no public symbols found; archive member will be inaccessibleCan someone tell me how to correct it. Please don't suggest pragma warning, I want to fix this properly.   
  Means that the .obj file has no public symbols exported. The solution is to remove any such .obj files from the link stage.   ;Quote:Original post by WashuMeans that the .obj file has no public symbols exported. The solution is to remove any such .obj files from the link stage.What do you mean by 'public symbols'?   ;Quote:Original post by AmmaQuote:Original post by WashuMeans that the .obj file has no public symbols exported. The solution is to remove any such .obj files from the link stage.What do you mean by 'public symbols'?He means exported symbols that would be seen by the other translation units. For example, a function, a class member, a global variables, and so on. Regards,   ;Quote:Original post by Emmanuel DelogetQuote:Original post by AmmaQuote:Original post by WashuMeans that the .obj file has no public symbols exported. The solution is to remove any such .obj files from the link stage.What do you mean by 'public symbols'?He means exported symbols that would be seen by the other translation units. For example, a function, a class member, a global variables, and so on. Regards,Thanks, but how do any of those get public/private?   ;  In other words, what's really going on is that the particular .obj file doesn't contain any code that will end up in your .exeYou have compiled a .c/.cpp, but you haven't called any of the functions/class members from it in your application, so the .obj file won't be used to create the .exeDoes that make sense to you?"public", as used, doesn't mean the same thing as "public:" in a class declaration, btw.;Quote:Original post by VergIn other words, what's really going on is that the particular .obj file doesn't contain any code that will end up in your .exeYou have compiled a .c/.cpp, but you haven't called any of the functions/class members from it in your application, so the .obj file won't be used to create the .exeDoes that make sense to you?"public", as used, doesn't mean the same thing as "public:" in a class declaration, btw.Thanks, makes much more sense.   