Re: [pcre-dev] VS2008 64-bit unresolved external symbol erro…

Kezdőlap
Üzenet törlése
Szerző: Sheri
Dátum:  
Címzett: Jeffrey Schmidt
CC: pcre-dev@exim.org
Tárgy: Re: [pcre-dev] VS2008 64-bit unresolved external symbol errors?
On 8/4/2011 9:49 AM, Jeffrey Schmidt wrote:
> Thanks for replying. I re-ran CMake and made sure the option BUILD_SHARED_LIBS was marked, then re-generated the project, and rebuilt it (I had *thought* I had marked it to build shared libs the first time, but for whatever reason, it wasn't building the .dll).
>
> After rebuilding pcre, and verifying that it generated the .dll this time, I copied the pcred.lib and pcred.dll over to the output directory for my test program, and this time it's working.
>
> Thanks again,
>
> Jeff Schmidt
> Seapine Software, Inc
> http://www.seapine.com


Glad to hear it.

Regards,
Sheri

>
> -----Original Message-----
> From: Sheri [mailto:silvermoonwoman@comcast.net]
> Sent: Wednesday, August 03, 2011 11:40 PM
> To: Jeffrey Schmidt
> Cc: pcre-dev@???
> Subject: Re: [pcre-dev] VS2008 64-bit unresolved external symbol errors?
>
> On 8/3/2011 3:17 PM, Jeffrey Schmidt wrote:
>> Hi,
>>
>>       I've been trying to troubleshoot this problem myself, but do not seem to be making progress, and I'm hoping someone on the list can provide a suggestion for how to resolve an error I'm seeing with PCRE.

>>
>>      I've got my program project compiling to the x64 target platform, and I compiled PCRE for x64 (or at least, I tried to - I used CMake to configure the project, and told CMake to use the Visual Studio 2008 64-bit tool set, when prompted).

>>
>>      I copied the pcred.lib file from the pcre/bin/Debug folder in my Visual Studio project, over to the output directory for my other program project, then I configured the properties for the test program's Project like so:

>>
>> Linker->General->Additional library directories:
>> Linker->General->(path/to/output/directory)
>> Linker->Input->Additional Dependencies: pcred.lib
>>
>> When I try to build the test program, I am getting errors:
>>
>> Error      2              error LNK2001: unresolved external symbol __imp_pcre_free   Test_PCRE.obj  Test_PCRE
>> Error      3              error LNK2019: unresolved external symbol __imp_pcre_exec referenced in function main                Test_PCRE.obj  Test_PCRE
>> Error      4              error LNK2019: unresolved external symbol __imp_pcre_compile referenced in function main                Test_PCRE.obj  Test_PCRE
>> Error      5              fatal error LNK1120: 3 unresolved externals         C:\Users\schmidtj\Documents\Visual Studio 2008\Projects\LSAPITest\bin\Debug\Test_PCRE.exe      Test_PCRE

>>
>> Any ideas of how I might resolve this? I realize this is more of a Visual Studio problem than a PCRE problem, but perhaps some of you may be familiar enough with VS to know how to fix this?
>>
>> Thanks,
>>
>> Jeff Schmidt
>> Seapine Software, Inc
>> http://www.seapine.com
> I can offer only this bit:
>
> Did you build pcretest.exe and run RunTest.bat?
>
> If so and all is well, take a look at the pcredemo program and documentation, possibly in your Test_PCRE program you need to #define PCRE_STATIC before including pcre.h
>
> Regards,
> Sheri
>
>
>
>