{"action":"created","issue":{"url":"https://api.github.com/repos/google/re2/issues/58","labels_url":"https://api.github.com/repos/google/re2/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/google/re2/issues/58/comments","events_url":"https://api.github.com/repos/google/re2/issues/58/events","html_url":"https://github.com/google/re2/issues/58","id":110566791,"number":58,"title":"Building with USEPCRE in MSCV 2013 gives link errors: entry point pcre_free multiply defined.","user":{"login":"DThiebaud","id":1722014,"avatar_url":"https://avatars.githubusercontent.com/u/1722014?v=3","gravatar_id":"","url":"https://api.github.com/users/DThiebaud","html_url":"https://github.com/DThiebaud","followers_url":"https://api.github.com/users/DThiebaud/followers","following_url":"https://api.github.com/users/DThiebaud/following{/other_user}","gists_url":"https://api.github.com/users/DThiebaud/gists{/gist_id}","starred_url":"https://api.github.com/users/DThiebaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DThiebaud/subscriptions","organizations_url":"https://api.github.com/users/DThiebaud/orgs","repos_url":"https://api.github.com/users/DThiebaud/repos","events_url":"https://api.github.com/users/DThiebaud/events{/privacy}","received_events_url":"https://api.github.com/users/DThiebaud/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-10-09T00:23:50Z","updated_at":"2015-10-09T03:13:56Z","closed_at":null,"body":"Compiling the \"test\" project with USEPCRE defined, in MSVC 2013, I get warning messages that entry point pcre_free is defined in different programs:\r\n\r\n1>tester.obj : warning LNK4006: pcre_free already defined in pcre.obj; second definition ignored\r\n1>exhaustive_tester.obj : warning LNK4006: pcre_free already defined in pcre.obj; second definition ignored\r\n1>  test.vcxproj -> E:\\src\\re2\\bin\\Debug\\test.lib\r\n\r\nIf I try to build any program that uses test.lib with USEPCRE defined, I get similar messages but they are errors, not warnings, and the link fails:\r\n\r\n1>------ Build started: Project: exhaustive_test, Configuration: Debug x64 ------\r\n1>test.lib(tester.obj) : error LNK2005: pcre_free already defined in test.lib(exhaustive_tester.obj)\r\n1>test.lib(pcre.obj) : error LNK2005: pcre_free already defined in test.lib(exhaustive_tester.obj)\r\n1>pcre.lib(pcre_globals.obj) : error LNK2005: pcre_free already defined in test.lib(exhaustive_tester.obj)\r\n1>LINK : warning LNK4098: defaultlib 'MSVCRT' conflicts with use of other libs; use /NODEFAULTLIB:library\r\n1>E:\\src\\re2\\bin\\Debug\\exhaustive_test.exe : fatal error LNK1169: one or more multiply defined symbols found\r\n\r\n(Since PCRE is not native to Windows, I downloaded PCRE version 8.37, built it, and put pcre.lib and pcre.h in the default lib and include directories).\r\n\r\nI have no idea how this could happen. It looks as if tester.obj and exhaustive_tester.obj contain definitions of pcre_free, but looking at them, I don't see how they could. I am quite mystified.\r\n\r\nDoes this even matter? Do we need to be able the run the re2 tests with PCRE when building with MSVC?"},"comment":{"url":"https://api.github.com/repos/google/re2/issues/comments/146744821","html_url":"https://github.com/google/re2/issues/58#issuecomment-146744821","issue_url":"https://api.github.com/repos/google/re2/issues/58","id":146744821,"user":{"login":"DThiebaud","id":1722014,"avatar_url":"https://avatars.githubusercontent.com/u/1722014?v=3","gravatar_id":"","url":"https://api.github.com/users/DThiebaud","html_url":"https://github.com/DThiebaud","followers_url":"https://api.github.com/users/DThiebaud/followers","following_url":"https://api.github.com/users/DThiebaud/following{/other_user}","gists_url":"https://api.github.com/users/DThiebaud/gists{/gist_id}","starred_url":"https://api.github.com/users/DThiebaud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DThiebaud/subscriptions","organizations_url":"https://api.github.com/users/DThiebaud/orgs","repos_url":"https://api.github.com/users/DThiebaud/repos","events_url":"https://api.github.com/users/DThiebaud/events{/privacy}","received_events_url":"https://api.github.com/users/DThiebaud/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T03:13:56Z","updated_at":"2015-10-09T03:13:56Z","body":"Yes, pcre_free is the only symbol mentioned in the errors. I agree, it's quite bizarre. As far as I can see, pcre.c in the source code for pcre is the only place where pcre_free is defined."}}