How to update WxWidgets in WxDev-C++?

If you are using wxDev-C++ for your wxWidgets design, please ask your questions here instead of in IDE Related.
Post Reply
eriX
Experienced Solver
Experienced Solver
Posts: 84
Joined: Wed Feb 04, 2009 2:08 pm
Location: Germany
Contact:

How to update WxWidgets in WxDev-C++?

Post by eriX » Mon Aug 01, 2011 10:56 am

I need some new functions in my program, which are released with WxWidgets 2.9.2 first.

Could you give me please a short instruction how to update WxWidgets in WxDev-C++?

I've tried to replace the include/wx folder with the newer one from here, but this wont work - only errors and warnings in the WxDev-C++ IDE.

Thank you very much!

Greetings
- Eric

guyanqiu
Knows some wx things
Knows some wx things
Posts: 25
Joined: Sun Jun 13, 2010 2:44 pm

Re: How to update WxWidgets in WxDev-C++?

Post by guyanqiu » Mon Aug 29, 2011 9:10 am

1) Download the src;
http://www.wxwidgets.org/downloads/#latest_dev
2) Comply the src;
See the readme file when download the src file
3) Create the DevPackage;
Creating a DevPak for wxDev-C++
http://wxdsgn.sourceforge.net/?q=node/9
4) Install the DevPak .
I do that OK for wxWidgets2.8.12.
Only Install New,no need to remove the old version.
My English is poor,I wish you can understand me.
I found that some .a files only wxDev-C++have,such as:
libwxmsw28.a,libwxmsw28_chartart.a,libwxmsw28_deprecated.a......
if you comply the wxWidgets yourself ,the lib dir do not contain these files.So the complier will show errors.

eriX
Experienced Solver
Experienced Solver
Posts: 84
Joined: Wed Feb 04, 2009 2:08 pm
Location: Germany
Contact:

Re: How to update WxWidgets in WxDev-C++?

Post by eriX » Mon Aug 29, 2011 6:26 pm

I understood ;)

I've read these readme's and description... but thats to hard for me.
No chance... I'm actually not able to do this procedure...

Isn't there anyway a ready .devpack file for the latest version of wxwidgets?
I searched some time online, but I didn't found anything.

guyanqiu
Knows some wx things
Knows some wx things
Posts: 25
Joined: Sun Jun 13, 2010 2:44 pm

Re: How to update WxWidgets in WxDev-C++?

Post by guyanqiu » Tue Aug 30, 2011 1:32 am

Why do not use the Code::Blocks?It is easy to do so.
I will try wxWidgets2.9.2 in wxDev-C++.
If I am success,I will tell you how to .

guyanqiu
Knows some wx things
Knows some wx things
Posts: 25
Joined: Sun Jun 13, 2010 2:44 pm

Re: How to update WxWidgets in WxDev-C++?

Post by guyanqiu » Tue Aug 30, 2011 4:00 am

I complied the wxWidgets2.9.2,and install it to wxDev-C++
I wrote a how to ,but in Chinese,the link is
http://wenku.baidu.com/view/758d56c62cc ... 6bded.html
My English is poor,but hope that can help you.

ajm
Knows some wx things
Knows some wx things
Posts: 40
Joined: Thu Nov 25, 2010 12:48 pm

Re: How to update WxWidgets in WxDev-C++?

Post by ajm » Thu Sep 15, 2011 11:05 am

Can you please write this in English? because I really don't understand anything.

guyanqiu
Knows some wx things
Knows some wx things
Posts: 25
Joined: Sun Jun 13, 2010 2:44 pm

Re: How to update WxWidgets in WxDev-C++?

Post by guyanqiu » Thu Sep 22, 2011 1:11 pm

ajm wrote:Can you please write this in English? because I really don't understand anything.
1、Adding Environment Variables
Mine wxDev-C++ install position:D:\Dev-cpp
mingw32-make.exe install position:D:\Dev-Cpp\bin
cc1.exe install position):D:\Dev-Cpp\libexec\gcc\mingw32\3.4.5
We need add these directories to environment variables
1)Right-click on “My Computer” and choose “Properties”:
2)Pop a System Properties dialog,click the “Advanced” tab:
3)Click the button “Environment Variables”,then pop the Environment Variables dialog 。
4)To create a new variable,use the “New” button which in the “User variables for XXXX” ,also you can create it in the “System variables”。
Variable name:path
Variable value:D:\Dev-Cpp\bin;D:\Dev-Cpp\libexec\gcc\mingw32\3.4.5
Separate the path with “;”。
After added the Environment Variables, We can compile the wxWidgets2.9.2。
2、Compile wxWidgets2.9.2
Download the wxWidgets2.9.2 on the SourceForget,the unzip it。
Mine unzip positon is:F:\wxWidgets-2.9.2。
Now we start compiling。
Click “Start”,click “Run”,type “cmd”,and press Enter。
Input the commands behand the \>:
\>f:
Type the root dir “F:”,mine is F,Maybe yours is “C:” or “D:” ,
where you install the wxWidgets2.9.2.Use the command “cd” to moving into a directory.
F:\wxWidgets-2.9.2\build\msw
Becase there is “makefile.gcc” in this directory,which file our need.
\>cd F:\wxWidgets-2.9.2\build\msw
After changed into this directory ,we can compile now.
\>mingw32-make –f makefile.gcc BUILD=release UNICODE=0 MONOLITHIC=1 USE_OPENGL=1
The options :
BUILD=release,builds release version of the library,if use BUILD=debug,than builds the debug version of the library.
UNICODE=0, builds ANSI version of the library,if use UNICODE=1,than builds the Unicode version of the library.
SHARED=1,builds shared libraries(DLLs),if use SHARED=0 ,than builds the static library.
MONOLITHIC=1,builds single library, which name is “libwxmsw28.a”.If use MONOLITHIC=0,we will get several smaller libraries instead of single big one.
USE_OPENGL=1,this a for the OpenGL library.You need modify the setup.h(mine : F:\wxWidgets-2.9.2\include\wx\msw\setup.h) to #define wxUSE_GLCANVAS 1.
The compile command is:
\>mingw32-make –f makefile.gcc BUILD=debug UNICODE=0 USE_OPENGL=1 >result.txt
It takes about thirty minitus.
3、Install the 2.9.2 instead of the 2.8.10
first, record the setting of Compiler and Linker。
We do not need to change the directory, only install the 2.9.2 in the same pasition.
a)Copy the include header files:
In the directory: D:\Dev-Cpp\include\common, there are two filefolders: wx and msvc.
Rename them to wx_backup and msvc_backup,than copy the directory,
F:\wxWidgets-2.9.2\include, under which there are alse two same name filefolders: wx and msvc, to D:\Dev-Cpp\include\common。
b)Copy the lib files:
In the director: D:\Dev-Cpp\lib, you can search the “libwx*.a”,then cut them to another file folder.
In the F:\wxWidgets-2.9.2\lib\gcc_lib,search the “libwx*.a”,then copy them to the D:\Dev-Cpp\lib instead of the cut ones.
Create a new empty project, than you can see these link command in the Project Options:
Linker:
-mwindows
-l$(WXLIBNAME)
-l$(WXLIBNAME)_gl
-lwxtiff
-lwxjpeg
-lwxpng
-lwxzlib
-lwxregex
-lwxexpat
-lkernel32
-luser32
-lgdi32
-lcomdlg32
-lwinspool
-lwinmm
-lshell32
-lcomctl32
-lole32
-loleaut32
-luuid
-lrpcrt4
-ladvapi32
-lwsock32
-lodbc32
-lopengl32

-l$(WXLIBNAME),WXLIBNAME instead of “wxmsw28” ,
We need change the wxWidgets version to 2.9.2 in the Compiler Options wxWidgets:
2.8.9 ——>2.9.12:
Than ,WXLIBNAME instead of “wxmsw29”.
If you use the ANSI version ,and see these compiler errors:
[Linker Error] undefined reference to `wxString::ConvertStr(char const*, unsigned int, wxMBConv const&)'
[Linker Error] undefined reference to `wxFormatString::AsWChar()'
[Linker Error] undefined reference to `wxString::DoFormatWchar(wchar_t const*, ...)'
[Linker Error] undefined reference to `wxString::ConvertStr(char const*, unsigned int, wxMBConv const&)'
[Linker Error] undefined reference to `wxApp::Initialize(int&, wchar_t**)'
[Linker Error] undefined reference to `wxAppConsoleBase::OnAssertFailure(wchar_t const*, int, wchar_t const*, wchar_t const*, wchar_t const*)'
[Linker Error] undefined reference to `wxAppConsoleBase::OnAssert(wchar_t const*, int, wchar_t const*, wchar_t const*)'
[Linker Error] undefined reference to `wxString::ConvertStr(char const*, unsigned int, wxMBConv const&)'
Change “D:\Dev-Cpp\include\common\msw\setup.h”
#ifndef wxUSE_UNICODE
#define wxUSE_UNICODE 1
#endif
to:
#ifndef wxUSE_UNICODE
#define wxUSE_UNICODE 0
#endif

ajm
Knows some wx things
Knows some wx things
Posts: 40
Joined: Thu Nov 25, 2010 12:48 pm

Re: How to update WxWidgets in WxDev-C++?

Post by ajm » Mon Sep 26, 2011 7:05 am

Thank you!

Post Reply