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 » Thu Mar 04, 2021 5:43 am

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: 16190
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 » Thu Mar 04, 2021 7:52 am

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 » Thu Mar 04, 2021 9:01 am

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: 16190
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 » Thu Mar 04, 2021 9:29 am

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: 3062
Joined: Sun Jan 03, 2010 5:45 pm

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

Post by PB » Thu Mar 04, 2021 9:33 am

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 » Thu Mar 04, 2021 11:57 am

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

Post Reply