User forums > Using Code::Blocks

undefined reference to __imp__pcre_free

(1/2) > >>

rv2931:
Hello

I work on windows plateforme  and mingw, I linked the pcre.lib library V7.0 and durint compilation, I have this message :
"undefined reference to __imp__pcre_free"

I don't manage to solve the problem, has anybody an idea ?

thx

RV

dje:
Hi !

This forum is English only.
You probably need to add the library implementing __imp__pcre_free to the linker project settings.

Dje

rv2931:
oups sorry,

Yes but I thought that the definition of pcre_free is in pcre.lib cause it is declared in pcre.h.
I linked it but it doesn't work, only for this function, the other function pcre_xxx don't seem to pose problems
?.? :(

thomas:
Did you read the documentation?
--- Quote ---If you want to statically link against the .a file, you must define PCRE_STATIC before including pcre.h, otherwise the pcre_malloc and pcre_free exported functions will be declared __declspec(dllimport), with hilarious results.
--- End quote ---

rv2931:
ho, so, I'll do it
I didn't read the documentation, pcre is wellknown library, it is amazing that we have to do some stuff like that...

anyway

great thanks, I'll try that

Navigation

[0] Message Index

[#] Next page

Go to full version