Visual C and Link-time Code Generation

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
New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Visual C and Link-time Code Generation

Post by New Pagodi » Mon Nov 09, 2015 6:37 pm

I've spent most of the past week experimenting with different libraries for an upcoming project. It seems like most projects that come with visual c build files enable link time code generation by default. To keep the resulting libraries consistent with my wxWidgets libraries, I've been turning it off each time.

But I'm wondering if I should go the other way and instead rebuild the wxWidgets libraries with it. This is an option I'm not really familiar with. Does it provide any real, noticeable optimization? Or should I just keep turning it off with other libraries?

User avatar
tierra
Site Admin
Site Admin
Posts: 1343
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Re: Visual C and Link-time Code Generation

Post by tierra » Tue Nov 10, 2015 3:15 pm

As far as I understand it, if you're building and linking wxWidgets as a dynamic DLL library, it's likely not going to make a difference. It might if you're linking statically to wxWidgets, but really, don't bother unless you're you really are able to find a significant boost in performance. It is known for reducing executable size a good amount, but that's hardly a concern these days. It's also known for causing a *lot* of headaches with obscure issues involving incorrectly linked libraries with incompatible configurations, and many people prefer to just avoid it altogether for that reason. I believe this is the same reason that wxWidgets ships with this setting turned off by default.

New Pagodi
Super wx Problem Solver
Super wx Problem Solver
Posts: 347
Joined: Tue Jun 20, 2006 6:47 pm
Contact:

Re: Visual C and Link-time Code Generation

Post by New Pagodi » Fri Nov 13, 2015 6:02 pm

Thanks. That's what I wanted to know.

Post Reply