Author Topic: what's wrong with my setup?  (Read 6813 times)

Offline snmr

  • Single posting newcomer
  • *
  • Posts: 5
what's wrong with my setup?
« on: July 17, 2007, 03:40:09 am »
1.unzip the following archives to c:\dev\c\compiler\mingw
binutils-2.17.50-20060824-1.tar.gz
gcc-core-3.4.5-20060117-1.tar.gz
gcc-g++-3.4.5-20060117-1.tar.gz
mingw32-make-3.81-1.tar.gz
mingw-runtime-3.9.tar.gz
mingw-utils-0.3.tar.gz
w32api-3.6.tar.gz

done!

2.run gdb-6.3-2.exe and install to c:\dev\c\compiler\mingw
done!

3.set windows path with c:\dev\c\compiler\mingw\bin
done!

4.unzip the following archives to c:\dev\c\ide\codeblocks
CB_20070715_rev4266_win32.7z
mingwm10.7z
wxmsw28u_gcc_cb_wx284.7z

done!

5.unzip wxWidgets-2.8.4.zip to c:\dev\c\lib\wxWidgets284
done!

6.compile wxWidgets-2.8.4 with following command in dos mode
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1  clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=release UNICODE=1

mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1  clean
mingw32-make -f makefile.gcc USE_XRC=1 SHARED=1 MONOLITHIC=1 BUILD=debug UNICODE=1

gcc_dll
gcc_dll\mswu
gcc_dll\mswud added

done!

7.setting compiler & debugger
search dir
add the above include/lib/mingw relative path
......anything else?

8.run cb new project with wxsmith
project name=p3;
path=c:\work\c\20070716\p3
dialog base...

setting global variable "wx"
base:C:\DEV\C\Lib\wxWidgets284
include:C:\DEV\C\Lib\wxWidgets284\include
lib:C:\DEV\C\Lib\wxWidgets284\lib
......anything else?

9.add codes to p3main.cpp
void p3Dialog::OnButton1Click(wxCommandEvent& event)
{
    p3Dialog::StaticText1 -> SetLabel(_("abc"));
}

10.build it & i got these:

----------------------------------------------------
C:/DEV/C/Lib/wxWidgets284/include/wx/window.h:(.text$_ZN12wxStringBase10ConcatSelfEjPKc[wxStringBase::ConcatSelf(unsigned int, char const*)]+0x22): undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'
C:/DEV/C/Lib/wxWidgets284/include/wx/window.h:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x25): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
C:/DEV/C/Lib/wxWidgets284/include/wx/window.h:(.text$_ZN12wxStringBaseC2ERKS_[wxStringBase::wxStringBase(wxStringBase const&)]+0x47): undefined reference to `wxOnAssert(char const*, int, char const*, char const*, char const*)'
obj\Debug\p3App.o: In function `ZN12wxEvtHandler12TryValidatorER7wxEvent':
C:/DEV/C/Lib/wxWidgets284/include/wx/app.h:(.rdata$_ZTV5p3App[vtable for p3App]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
C:/DEV/C/Lib/wxWidgets284/include/wx/app.h:(.rdata$_ZTV5p3App[vtable for p3App]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)'
C:/DEV/C/Lib/wxWidgets284/include/wx/app.h:(.rdata$_ZTV5p3App[vtable for p3App]+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, 11 seconds)
6 errors, 0 warnings
------------------------------------------------------

anything i havn't done yet ? or something i did wrong?



my first time in cb nightly builds, and my first time in c++ also...
i need a unicode C++ ide env, but i don't like a huge vc 2005...




Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: what's wrong with my setup?
« Reply #1 on: July 17, 2007, 04:13:00 am »
Nothing stands out as wrong.

Please turn on Compiler Logging.

Settings -> "Compiler Debugger"
Select tab "Other Settings" on far right
Change "Compiler Logging" to "Full Command Line"

Then Try rebuilding and post the "Build Log" Then someone might see the issue cause.

Tim S
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline snmr

  • Single posting newcomer
  • *
  • Posts: 5
Re: what's wrong with my setup?
« Reply #2 on: July 17, 2007, 04:18:44 am »
here it is

-------------- Build: Debug in p3 ---------------
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wall -g -D__WXDEBUG__  -IC:\DEV\C\Lib\wxWidgets284\include -IC:\DEV\C\Lib\wxWidgets284\contrib\include -I\mswd -IC:\DEV\C\Compiler\MinGW\include -Ic:\DEV\C\Lib\wxWidgets284\include\ -Ic:\DEV\C\Lib\wxWidgets284\include\wx\msw\ -Ic:\DEV\C\Lib\wxWidgets284\lib\gcc_dll\mswud\  -c C:\Works\c\CB\20070716_001\p3\p3Main.cpp -o obj\Debug\p3Main.o
windres.exe -i C:\Works\c\CB\200707~1\p3\resource.rc -J rc -o obj\Debug\resource.res -O coff -IC:\DEV\C\Lib\wxWidgets284\include -I\mswd -IC:\DEV\C\Compiler\MinGW\include
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -Wall -g -D__WXDEBUG__  -IC:\DEV\C\Lib\wxWidgets284\include -IC:\DEV\C\Lib\wxWidgets284\contrib\include -I\mswd -IC:\DEV\C\Compiler\MinGW\include -Ic:\DEV\C\Lib\wxWidgets284\include\ -Ic:\DEV\C\Lib\wxWidgets284\include\wx\msw\ -Ic:\DEV\C\Lib\wxWidgets284\lib\gcc_dll\mswud\  -c C:\Works\c\CB\20070716_001\p3\p3App.cpp -o obj\Debug\p3App.o
mingw32-g++.exe -LC:\DEV\C\Compiler\MinGW\lib -Lc:\DEV\C\Lib\wxWidgets284\lib\ -Lc:\DEV\C\Lib\wxWidgets284\lib\gcc_dll\  -o bin\Debug\p3.exe obj\Debug\p3Main.o obj\Debug\p3App.o  obj\Debug\resource.res   -lkernel32 -luser32 -lgdi32 -lwinspool -lcomdlg32 -ladvapi32 -lshell32 -lole32 -loleaut32 -luuid -lcomctl32 -lwsock32 -lodbc32 C:\DEV\C\Lib\wx\lib\gcc_dll\libwxzlibd.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxbase28u.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxbase28u_net.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxbase28u_xml.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxbase28ud.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxbase28ud_net.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxbase28ud_xml.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxexpat.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxexpatd.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxjpeg.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxjpegd.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_adv.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_aui.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_core.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_html.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_media.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_richtext.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28u_xrc.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_adv.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_aui.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_core.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_html.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_media.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_richtext.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxmsw28ud_xrc.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxpng.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxpngd.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxregexu.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxregexud.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxtiff.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxtiffd.a C:\DEV\C\Lib\wx\lib\gcc_dll\libwxzlib.a  -mwindows
Info: resolving wxStringBase::npos       by linking to __imp___ZN12wxStringBase4nposE (auto-import)
Info: resolving wxDialogBase::sm_eventTable        by linking to __imp___ZN12wxDialogBase13sm_eventTableE (auto-import)
Info: resolving _wxDefaultSize by linking to __imp__wxDefaultSize (auto-import)
Info: resolving _wxDefaultPosition by linking to __imp__wxDefaultPosition (auto-import)
Info: resolving _wxDefaultValidator by linking to __imp__wxDefaultValidator (auto-import)
Info: resolving _wxEVT_COMMAND_BUTTON_CLICKED by linking to __imp__wxEVT_COMMAND_BUTTON_CLICKED (auto-import)
Info: resolving vtable for wxStaticLineby linking to __imp___ZTV12wxStaticLine (auto-import)
Info: resolving vtable for wxControlby linking to __imp___ZTV9wxControl (auto-import)
Info: resolving vtable for wxControlBaseby linking to __imp___ZTV13wxControlBase (auto-import)
Info: resolving vtable for wxWindowby linking to __imp___ZTV8wxWindow (auto-import)
Info: resolving vtable for wxButtonby linking to __imp___ZTV8wxButton (auto-import)
Info: resolving vtable for wxStaticTextby linking to __imp___ZTV12wxStaticText (auto-import)
Info: resolving vtable for wxDialogby linking to __imp___ZTV8wxDialog (auto-import)
Info: resolving vtable for wxDialogBaseby linking to __imp___ZTV12wxDialogBase (auto-import)
Info: resolving vtable for wxTopLevelWindowby linking to __imp___ZTV16wxTopLevelWindow (auto-import)
Info: resolving vtable for wxTopLevelWindowMSWby linking to __imp___ZTV19wxTopLevelWindowMSW (auto-import)
Info: resolving _wxEVT_NULL by linking to __imp__wxEVT_NULL (auto-import)
Info: resolving _wxEmptyString by linking to __imp__wxEmptyString (auto-import)
Info: resolving wxAppConsole::ms_appInstance        by linking to __imp___ZN12wxAppConsole14ms_appInstanceE (auto-import)
Info: resolving wxAppConsole::ms_appInitFn        by linking to __imp___ZN12wxAppConsole12ms_appInitFnE (auto-import)
obj\Debug\p3Main.o: In function `ZNK12wxWindowBase7GetNameEv':
C:/DEV/C/Lib/wxWidgets284/include/wx/window.h:(.text$_ZN12wxStringBase10ConcatSelfEjPKc[wxStringBase::ConcatSelf(unsigned int, char const*)]+0x22): undefined reference to `wxStringBase::ConcatSelf(unsigned int, char const*, unsigned int)'
C:/DEV/C/Lib/wxWidgets284/include/wx/window.h:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x25): undefined reference to `wxStringBase::InitWith(char const*, unsigned int, unsigned int)'
C:/DEV/C/Lib/wxWidgets284/include/wx/window.h:(.text$_ZN12wxStringBaseC2ERKS_[wxStringBase::wxStringBase(wxStringBase const&)]+0x47): undefined reference to `wxOnAssert(char const*, int, char const*, char const*, char const*)'
obj\Debug\p3App.o: In function `ZN12wxEvtHandler12TryValidatorER7wxEvent':
C:/DEV/C/Lib/wxWidgets284/include/wx/app.h:(.rdata$_ZTV5p3App[vtable for p3App]+0x44): undefined reference to `wxApp::Initialize(int&, char**)'
C:/DEV/C/Lib/wxWidgets284/include/wx/app.h:(.rdata$_ZTV5p3App[vtable for p3App]+0x90): undefined reference to `wxAppConsole::OnAssertFailure(char const*, int, char const*, char const*, char const*)'
C:/DEV/C/Lib/wxWidgets284/include/wx/app.h:(.rdata$_ZTV5p3App[vtable for p3App]+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, 13 seconds)
6 errors, 0 warnings
 

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7591
    • My Best Post
Re: what's wrong with my setup?
« Reply #3 on: July 17, 2007, 05:17:44 am »
Your wxWidgets is an MONOLITHIC build as is normally in the windows Code::Blocks world.
But, your build logs shows that it is trying to do an MultiLib build, re-run the wizard and look for anyplace that mentions MultiLib or MONOLITHIC. You want the MONOLITHIC to be true.

I don't use the wizard much and wxSmith even less so I can't help you find where the option needs changed.

Tim S

PS: Seeing libwxmsw28ud_core.a in the build log means this
wxmsw means windows
28 means 2.8.x version of wxWidgets
u means unicode
d means debug
core means MultiLib build because core does not exist in MONOLITHIC builds.
« Last Edit: July 17, 2007, 05:20:35 am by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org