hi
I recently discovered wxWidgets and I'm in the middle of learning how to use it - but building a simple project takes like 20-25 seconds each time and it's starting to frustrate me. I have precompiled headers on so that helps quite a bit (it used to be like 40-45 seconds o.O) but there's till the linking part that takes a while - is there anything i can do to shorten that time?
I'm using VC++ 2005
I built the release static versions as well as the dll versions
Is there some setting in VC++ that I need to configure to make the project use the DLLs? (since i think that that might make the linking shorter?)
What I want to do is use the dlls for debugging and the static libs for releases.
thanks for your time.
how to use DLLs Topic is solved
Hi!
When building the DLL version it should create a lib to for the DLL as well. All you'd have to do is to point to this lib when linking and make sure the DLL can be found.
This might bring down compilation time, but I wonder why it takes so long for you anyway. I'm using VC 2003 and for a simple project in debug config it takes about 1-2 seconds to compile and link for me. For complex projects initial compilation mostly runs under 1 minute (depending on the project) and once build, changes compile and link in about 10 secs. Are you sure that you're only compiling, not rebuilding the whole project each time?
When building the DLL version it should create a lib to for the DLL as well. All you'd have to do is to point to this lib when linking and make sure the DLL can be found.
This might bring down compilation time, but I wonder why it takes so long for you anyway. I'm using VC 2003 and for a simple project in debug config it takes about 1-2 seconds to compile and link for me. For complex projects initial compilation mostly runs under 1 minute (depending on the project) and once build, changes compile and link in about 10 secs. Are you sure that you're only compiling, not rebuilding the whole project each time?
OS: OpenSuSE, Ubuntu, Win XP Pro
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
wx: svn
Compiler: gcc 4.5.1, VC 2008, eVC 4
"If it was hard to write it should be hard to read..." - the unknown coder
"Try not! Do. Or do not. There is no try." - Yoda
-
- Earned a small fee
- Posts: 10
- Joined: Wed Feb 14, 2007 6:14 pm
hey
thanks for the quick reply
i tried using the libs that were generated with the dlls but i got maybe 14 linking errors concerning wxglcanvas
i changed the setup.h to include the wxGLCanvas when building both static and dlls
also when i use the static builds i dont get any errors so im kinda at a loss here
any help would be appreciated
thanks for your time
Edit:
it seems that it's not an error with wxGLCanvas - even just loading a window gives linking errors like:
and 10 more of those
Are there any special setting in VC++ that i must have in order to use dlls instead of static libs?
thanks for the quick reply
i tried using the libs that were generated with the dlls but i got maybe 14 linking errors concerning wxglcanvas
i changed the setup.h to include the wxGLCanvas when building both static and dlls
also when i use the static builds i dont get any errors so im kinda at a loss here
any help would be appreciated
thanks for your time
Edit:
it seems that it's not an error with wxGLCanvas - even just loading a window gives linking errors like:
Code: Select all
test.obj : error LNK2001 : unresolved external symbol "protected: static strucy wxEventTable const wxFrame::sm_eventTable.....
Are there any special setting in VC++ that i must have in order to use dlls instead of static libs?
-
- Earned a small fee
- Posts: 10
- Joined: Wed Feb 14, 2007 6:14 pm
hi
sorry for all the trouble
i should have searched more thoroughly in the forum for the solution
it turns out i didn't specify -DWXUSINGDLL in the commandline options
i also didnt define __WXDEBUG__
in any case it's compiling a in less than a second now so i'm satisfied
thanks to all those who answered.
sorry for all the trouble
i should have searched more thoroughly in the forum for the solution
it turns out i didn't specify -DWXUSINGDLL in the commandline options
i also didnt define __WXDEBUG__
in any case it's compiling a in less than a second now so i'm satisfied
thanks to all those who answered.