Author Topic: wxWidgets project wizard  (Read 3774 times)

Offline zetab

  • Multiple posting newcomer
  • *
  • Posts: 18
wxWidgets project wizard
« on: March 30, 2016, 07:43:16 am »
Hi,

I got many "undefined reference to ..." error when compiling a project which has a dynamic linking "Debug" target and a static linking "Release" target.

Here are the steps I create my project and targets:

1. Create a Dialog based application using wxFormBuilder as GUI builder. On the configuration page, only check the "Debug" configuration. On configuration options page, check the "Use wxWidgets DLL" option.
2. Add a "Release" target from menu: File->New->Build target. On configuration options page, uncheck the "Use wxWidgets DLL" option.

When I build the "Release" target, the error came out.

I figure out the error is because some windows libraries(libkernel32.a, libuser32.a, libgdi32.a, ...) are not linked in linker setting.

I end up with modifying the wizard.script of wxWidgets project wizard. I have created several projects by using modified wizard without any problem. But I don't know if this is the correct solution.

The attached file is the modified wizard.script.


Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2778
Re: wxWidgets project wizard
« Reply #1 on: March 30, 2016, 04:47:04 pm »
Under Build Options->Linker Settings->Link Libraries you could add some or all of the following:

libkernel32.a
libuser32.a
libgdi32.a
libwinspool.a
libcomdlg32.a
libadvapi32.a
libshell32.a
libole32.a
liboleaut32.a
libuuid.a
libcomctl32.a
libwsock32.a
libodbc32.a

Offline zetab

  • Multiple posting newcomer
  • *
  • Posts: 18
Re: wxWidgets project wizard
« Reply #2 on: March 31, 2016, 03:51:32 am »
Under Build Options->Linker Settings->Link Libraries you could add some or all of the following:

libkernel32.a
libuser32.a
libgdi32.a
libwinspool.a
libcomdlg32.a
libadvapi32.a
libshell32.a
libole32.a
liboleaut32.a
libuuid.a
libcomctl32.a
libwsock32.a
libodbc32.a

Yes, but manually adding those libraries every time creating project could be annoying.

If I create project with "Debug" and "Release" targets both as static linking. Those libraries will be added by project wizard automatically.

So I think using project wizard to handle it will be better.