Code::Blocks Forums
User forums => Help => Topic started by: jack32 on October 03, 2007, 11:46:07 am
-
im am trying to get Code::Blocks to work with wxWidgets 2.8.5
after reading several tutorials and trying many settings
i finally get this error:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : D:\CodeBlocks\code\test3\
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: D:\CodeBlocks\code\test3\wxWidgets.exe
.objs\main.o: In function `ZNK12wxWindowBase7IsShownEv':
C:/wxWidgets-2.8.5/include/wx/window.h:(.text$_ZN12wxStringBaseC2ERKS_[wxStringBase::wxStringBase(wxStringBase const&)]+0x47): undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'
C:/wxWidgets-2.8.5/include/wx/window.h:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)'
C:/wxWidgets-2.8.5/include/wx/window.h:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x94): undefined reference to `wxAppConsole::OnAssert(char const*, int, char const*, char const*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
i can start all over again and reinstall code blocks and compile wxWidgets again, if you name me a tutorial that works.
-
What is your OS version? WinXP SP2?
Which drive is MinGW GCC installed on?
Which drive is Code::Blocks installed on?
I will try to update the Installation Direction for you, but will need feedback from you.
Working on Updating Instructions here
http://wiki.codeblocks.org/index.php?title=Compiling_wxWidgets_2.8.6_to_develop_Code::Blocks_%28MSW%29
Tim S
-
Ok. sure. you need more input:
I have Win 2k3, but you can say i have Win XP SP2. :)
My wxWidgets are in D:\wxWidgets-2.8.5
My CodeBlocks is in D:\CodeBlocks
And some Settings:
Settungs > Compiler Settings > Directories > Compiler
d:\CodeBlocks\include
d:\wxWidgets-2.8.5\include
D:\wxWidgets-2.8.5\lib\gcc_dll
Settungs > Compiler Settings > Directories > Linker
d:\CodeBlocks\lib
d:\wxWidgets-2.8.5\lib\gcc_dll
Settungs > Compiler Settings > Directories > Custom Variables
VX_VER = d:\wxWidgets-2.8.5\include
I try to compile a new fresh Project:
File > New Project > wxWidgets Application > Create > [save]
Project > Properties > Projects Build Options > Linker > [Edit from wxmsw26 to wxmsw28]
Build > Build
And i get:
Project : wxWidgets application
Compiler : GNU GCC Compiler (called directly)
Directory : D:\CodeBlocks\code\test3\
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: D:\CodeBlocks\code\test3\wxWidgets.exe
.objs\main.o: In function `ZNK12wxWindowBase7IsShownEv':
C:/wxWidgets-2.8.5/include/wx/window.h:(.text$_ZN12wxStringBaseC2ERKS_[wxStringBase::wxStringBase(wxStringBase const&)]+0x47): undefined reference to `_imp___Z10wxOnAssertPKciS0_S0_S0_'
C:/wxWidgets-2.8.5/include/wx/window.h:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)'
C:/wxWidgets-2.8.5/include/wx/window.h:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x94): undefined reference to `wxAppConsole::OnAssert(char const*, int, char const*, char const*)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
-
What compiler are you using?
What directory is the compiler in?
Normally it is C:\MinGW but it should in your case it should be on the D Drive.
Are you using a Code::Blocks nightly build? Or is it RC2 build?
Tim S
-
I use the "Code::Blocks IDE, with MINGW compiler" from here http://www.codeblocks.org/downloads.shtml
Version: 1.0rc2
So the MINGW compiler is in the Code::Blocks Directory
-
Please download a Code::Blocks Nightly version into a fresh Code::Blocks folder.
Use a new folder or delete the contents of the old folder.
Nightly Build are on here
http://forums.codeblocks.org/index.php/topic,7029.0.html
Or the project page here
http://developer.berlios.de/project/showfiles.php?group_id=5358
Directions on Nightly Build here
http://forums.codeblocks.org/index.php/topic,3232.0.html
To Install a newer MinGW GCC I suggest
http://prdownloads.sourceforge.net/mingw/MinGW-5.1.3.exe
And pick "candidate" packages.
Time for Classes, so I am off to College.
Tim S
-
ok now i have the nightly build....
with the 2 dlls
and i have installed mingw to D:\MinGW
and now i get
---------------------------
Warning
---------------------------
A matching Debug configuration cannot be found in the wxWidgets directory you specified.
This means that Debug target of your project will not build.
Are you sure you want to continue with these settings?
---------------------------
Ja Nein
---------------------------
and
---------------------------
Warning
---------------------------
A matching Release configuration cannot be found in the wxWidgets directory you specified.
This means that Release target of your project will not build.
Are you sure you want to continue with these settings?
---------------------------
Ja Nein
---------------------------
but i seems to me that all directorys are set correct.
-
Did you compile wxWidgets?
If you don't wish to compile wxWidgets and have a fast internet connection I suggest wxPack, it contains compiled wxWidgets libraries.
http://wxpack.sourceforge.net/Main/Downloads
Tim S
-
yes, wxWidgets were compiled.
Now I have deleted them and recompiled them
using:
mingw32-make.exe -f makefile.gcc clean
mingw32-make.exe -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=0
same error.....
now i will try wxPack
-
Rather than trying to use (or update) those dated instructions, just follow the wxWindowsQuickRef (http://wiki.codeblocks.org/index.php?title=WxWindowsQuickRef).
-
now its working with wxPack
i don't know why it wont work with the self build ones