I'm confused. I'm trying to put a WxLogWindow in my app, and use it primarily as a system log. I create the window in OnInit(), and then as I go into and out of classes/functions I log the occurance, and I want to drop certian varialble values into it along the way. The log window comes up, which was the easy part. Then the only way I cold get messages in it was with WxLogMessage, WxLogDebug did nothing. This is no good, as I don't want them in the release build. After searching the forums, and google, I saw that __WXDEBUG__ had to to be defined. When I put __WXDEBUG-__ in I get a bunch of wxOnAssert undefined linker error. Reading through the forums has seemed to run me in circles. I am using WxDevCPP 6.10 with the WxWidgets 2.8.0 DevPak. I read that WxWidgets has to be built in debig mode for the Log functions to work, and that WxDevCpp and the 2.8 DevPak disabled debug mode, is this true? I downloaed the 2.8 source, compiled it with debug, and tried to use those libraries, but got tons of other errors. I guess I didn't set up the debuglibrary correctly, or link to them correctly.
Thanks for the forum, and any help.
wxOnAssert
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
You are getting those bunch of errors as the other settings are different, such as C Runtime Library, Compiler Options etc.
I have an better alternative for you. Please visit the following forum and download and install latest Nightly of Code::Blocks.
http://forums.codeblocks.org/index.php?board=20.0
The new project wizard of Code::Blocks can handle almost all type of wx libs (Except Universal one). You have to point to the wxwidgets directory and select appropriate settings. Wizard will do the rest for you.
AFAIK, there is not much customisations options available in wxDevCPP.
I have an better alternative for you. Please visit the following forum and download and install latest Nightly of Code::Blocks.
http://forums.codeblocks.org/index.php?board=20.0
The new project wizard of Code::Blocks can handle almost all type of wx libs (Except Universal one). You have to point to the wxwidgets directory and select appropriate settings. Wizard will do the rest for you.
AFAIK, there is not much customisations options available in wxDevCPP.
-
- Earned a small fee
- Posts: 10
- Joined: Mon Feb 05, 2007 7:01 pm
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
I couldn't elaborate the issue at that time due to time constraint.biplab wrote:You are getting those bunch of errors as the other settings are different, such as C Runtime Library, Compiler Options etc.
The problem is your project file is compiled in Release mode. Assuming you are using MSVC, do the following.
- Change compiler option /MD to /MDd
- Add __WXDEBUG__ as preprocessor define
- Add /NODEFAULTLIB:msvcrt.lib, /NODEFAULTLIB:libcmt.lib and /NODEFAULTLIB:libcmtd.lib to linker.
- Add msvcrtd.lib to linker as input file, if necessary
- Change the wx libraries. E.g, if you find wxbase28.lib to wxbase28d.lib and do this with other libs.
-
- Earned a small fee
- Posts: 10
- Joined: Mon Feb 05, 2007 7:01 pm
Thanks for the reply, but I'm using the mingw32 compiler that ships with DevCpp. I will try to work these suggestions into the project. However, when I look at the project setting I do have the Generate Debugging Info set to Yes. As for changing the libraries, I see in my libraries tab where it is using -lwxmsw28 -lwxmsw28_gl, but when I built the debug libraries, I see the libwxbase28d, but nothing named -lwxmsw28d? What's the difference?
I have the WxWidgets book, and plan to do some reading tonight. Your help is greatly appriciated.
I have the WxWidgets book, and plan to do some reading tonight. Your help is greatly appriciated.
-
- I live to help wx-kind
- Posts: 194
- Joined: Fri Feb 17, 2006 4:16 am
- Location: Singapore
- Contact:
OK.
Remove -lwxmsw28 -lwxmsw28_gl. Then add -lwxmsw28d_core, -lwxbase28d, -lwxpngd.a, -lwxzlibd.a in place of them.
If you want to add any more libraries, the add them as -l<libname.a> or -l<name>. E.g, if you want to add libwxmsw28d_html.a, then add it as -llibwxmsw28d_html.a or -lwxmsw28d_html
The difference is wxDevCPP comes with monolithic build of library whereas you've compiled the wxWidgets in Non-monolithic mode.BlueStallion60 wrote:I see in my libraries tab where it is using -lwxmsw28 -lwxmsw28_gl, but when I built the debug libraries, I see the libwxbase28d, but nothing named -lwxmsw28d? What's the difference?
Remove -lwxmsw28 -lwxmsw28_gl. Then add -lwxmsw28d_core, -lwxbase28d, -lwxpngd.a, -lwxzlibd.a in place of them.
If you want to add any more libraries, the add them as -l<libname.a> or -l<name>. E.g, if you want to add libwxmsw28d_html.a, then add it as -llibwxmsw28d_html.a or -lwxmsw28d_html
-
- Earned a small fee
- Posts: 10
- Joined: Mon Feb 05, 2007 7:01 pm