From: Warren Young Date: June 19 2007 5:32am Subject: Re: LNK2005 visual studio 2005 List-Archive: http://lists.mysql.com/plusplus/6671 Message-Id: <46776A7B.5020003@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Nils Woetzel wrote: > So I tried to get rid of MYSQLPP_EXPORT related to all > std::vector instantiations, which are only found for the > FieldNames class. (field_names.h and row.h) > > .... > > This resolved the entire linking issue in visual studio. Patch applied. Thanks for the detailed report! > But now the problem might be that mingw will not do what it was supposed to > do (at least what the comments in svn are saying). I suppose a MinGW user will have to test it before the next release, then. :) I can't muster the will to fight with MinGW very often. > But building with mingw still works for me (I use g++ of mingw, but the > cygwin make), I am not sure about other building systems, but since this is > was only important for the windows dll I guess there might not be a reason > to export the entire Field_Names class, but only the "Init" function. A couple of errors here, I think. First, I think the FieldTypes class also needs the same treatment. Second, there's no point in exporting the init() function from these classes, as it is private. You can't use it from outside the library, even if you wanted to. Besides, the whole reason we can get away with removing MYSQLPP_EXPORT from these classes is that they're not supposed to be used directly from outside the library. My patch takes these things into account.