Linking error when integrating wxwidget3.1.4 to my c++ project.

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
kyadav78
Knows some wx things
Knows some wx things
Posts: 29
Joined: Thu Feb 22, 2018 10:37 am

Linking error when integrating wxwidget3.1.4 to my c++ project.

Post by kyadav78 »

Hi,
I have built wxwidget in vs2019 and created static libraries, when i am integrating wxwidget 3.1.4 libraries statically with my C++ project , i am getting following linking errors . could you please help me in resolving these errors.:
1>wxbase314u.lib(regex.obj) : error LNK2001: unresolved external symbol wx_re_comp
1>wxbase314u.lib(regex.obj) : error LNK2001: unresolved external symbol wx_re_exec
1>wxbase314u.lib(regex.obj) : error LNK2001: unresolved external symbol wx_regfree
1>wxbase314u.lib(regex.obj) : error LNK2001: unresolved external symbol wx_regerror

Project settings are same both in wxwdget and my CPP project as show in the attachment. Please help me in resolving this.

Regards
Kunal
Attachments
Project_Properties.png
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Linking error when integrating wxwidget3.1.4 to my c++ project.

Post by doublemax »

Did you add wxregex[ud].lib to the project?
Use the source, Luke!
kyadav78
Knows some wx things
Knows some wx things
Posts: 29
Joined: Thu Feb 22, 2018 10:37 am

Re: Linking error when integrating wxwidget3.1.4 to my c++ project.

Post by kyadav78 »

Hi,
No , i have not added that in my project. when we upgraded last version 3.0, or 2.8 we never used that library.
Should i add wxregex.lib?
Regards
Kunal
User avatar
doublemax
Moderator
Moderator
Posts: 19103
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: Linking error when integrating wxwidget3.1.4 to my c++ project.

Post by doublemax »

kyadav78 wrote: Thu Mar 04, 2021 9:01 am Should i add wxregex.lib?
Might be worth a try.
Use the source, Luke!
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4182
Joined: Sun Jan 03, 2010 5:45 pm

Re: Linking error when integrating wxwidget3.1.4 to my c++ project.

Post by PB »

The dependency of the base library on the regex library when using static wxWidgets build was introduced in 3.1.4 (and removed in 3.1.5).
kyadav78
Knows some wx things
Knows some wx things
Posts: 29
Joined: Thu Feb 22, 2018 10:37 am

Re: Linking error when integrating wxwidget3.1.4 to my c++ project.

Post by kyadav78 »

HI,
adding wxregexu.lib in the project resolves the errors.
Thanks you helping me out.
Thank you PB for clarification .
Regards
Kunal
Post Reply