User forums > Help

Help Dummies, Idiots and Newbies

<< < (2/3) > >>

RJP Computing:
Well I can offer some help. On the website look at the tutorials for some setup help.

wxPack Tutorials

Specificly look at these two tutorials:
http://wxpack.sourceforge.net/Tutorials/CodeBlocks
http://wxpack.sourceforge.net/Tutorials/CodeBlocksWxWizardGCC

Michael:
Hello,


--- Quote from: tec on August 25, 2006, 07:06:26 pm ---A friend of mine suggested CB, but although I'm trying really hard (searching Forum and Wiki over and over again),
I havn't been able to get CB work with wxwidgets.

--- End quote ---

if you explain your problems, may be we can help you to solve them.


--- Quote from: tec on August 25, 2006, 07:06:26 pm ---I'm willing to learn..., but I need assistance. Like a Step-by-Step-Description on how to get it done (sorry).

--- End quote ---

Did you look at the wxWidgets website? Sometime you can find helpful example in searching with google. Moreover, there is always the free wxWidgets book :).


All the best,
Michael

ColinGross:
Here is my situation:  I learned to code using Borland compilers, but switched to Microsoft Visual Studio in college.  Currently I've finished the last project I ever want to do in Visual Studio 6.  The new project that an undergrad and I will be working on is going to be coded using wxWidgets.

I have been able to compile the libraries for wxWidgets using VC6 and mingw.  We have had success getting VC6 to compile some wx projects.  However, using VC6 for wxWidgets makes little sense as it is about as useful to me as VI and a command line compiler.

The dilema:  getting C::B and wxWidgets to play nice on these win2kpro machines.  Thus far we've each spend about 10 hours trying to get this correct.  The last thing we've tried has been to remove C::B, wxwidgets, and  minGW and starting from scratch.

Here's what we've done:
mingw installed, wxwidgets unpacked, wxwidgets compiled as per this wiki set up guide(http://www.wxwidgets.org/wiki/index.php/CodeBlocks_Setup_Guide), installed C::B, and opened a wxwindows project.

I am unsure how much of the project setting or makefile would be useful in this post, but here are some of the project settings:
Project>Build Options>Other Options:
-pipe
-mthreads
-Winvalid-pch
-include "wx_pch.h"
-c
-fno-rtti
-fno-exceptions
-fno-pcc-struct-return
-fstrict-aliasing
-Wno-ctor-dtor-privacy

Project>Build Options>Defines:
HAVE_W32API_H
__WXMSW__
__GNUWIN32__
__WIN95__
WXUSINGDLL

Project>Build Options>Directories>Compiler
$(WX_DIR)\include
$(WX_DIR)\lib\gcc_lib$(WX_CFG)\msw
$(WX_DIR)\contrib\include

Project>Build Options>Directories>Linker
$(WX_DIR)\lib\gcc_lib($WX_CFG)
C:\wxWidgets-2.6.3\lib\gcc_dll

Project>Build Options>Directories>Resource compiler
$(WX_DIR)\include

Project>Build Options>Custom variables
WX_DIR=C:\wxWidgets-2.6.3
WX_CFG=

Now, here is the Build Log we recieve when trying to compile the project:

Compiler  : GNU GCC Compiler (called directly)
Directory : G:\wxCodeBlocksProjs\testProj1\
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: G:\wxCodeBlocksProjs\testProj1\wxWidgets.exe
.objs\main.o:main.cpp:(.text$_ZN12wxStringBaseC2EPKc[wxStringBase::wxStringBase(char const*)]+0x27): undefined reference to `_imp___ZN12wxStringBase8InitWithEPKcjj'
.objs\main.o:main.cpp:(.text$_Z16wxGetTranslationPKc[wxGetTranslation(char const*)]+0x2c): undefined reference to `_imp___ZNK8wxLocale9GetStringEPKcS1_'
.objs\main.o:main.cpp:(.rdata$_ZTV5MyApp[vtable for MyApp]+0x68): undefined reference to `wxApp::Initialize(int&, char**)'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings


So at this point, we're not exactly sure where to go.  It looks like we're not linking a library that we need to, but we have the following libraries linked (Project Options>Linker>Link libraries:) wxmsw26u, winspool, winmm, shell32, comctl32, ct3d32, odbc32, advapi32, wsock32, opengl32, glu32, ole32, oleaut32, uuid, wxzlib, wxregexu, wxexpat.  I was under the impression that those were the required libraries and then some.

We've decided that these errors are likely due to some small option or method we have overlooked.  If we ever do figure out what the problem is  it will likely make us feel a bit embarassed in that "oh duh!" sort of way.

Any insight will be greatly appreciated.

Thank you in advance,
Colin & Chris

RJP Computing:
Colin and Chris,

Have you tried wxPack? It should take most of your work right out of the build and setup of wxWidgets. Then you can get to the important stuff, programming your application using a great IDE. (Code::Blocks)  :wink:

Try following these two tutorials and see how far you get.

Code::Blocks Nightly Build Setup
Code::Blocks wxWidgets wizard using gcc

Give it a try. You have nothing to loose.

MortenMacFly:

--- Quote from: ColinGross on September 20, 2006, 01:51:10 am ---It looks like we're not linking a library that we need to, but we have the following libraries linked (Project Options>Linker>Link libraries:) wxmsw26u, winspool, winmm, shell32, comctl32, ct3d32, odbc32, advapi32, wsock32, opengl32, glu32, ole32, oleaut32, uuid, wxzlib, wxregexu, wxexpat. 
--- End quote ---
Please notice the following:
1.) the order of how the libs are linked is important and matters Thus, if wxzlib requires wxmsw26u it has to come before wxmsw26u.
2.) unless you are really using methos that require to link against wxzlib, wxregex and/or wxexpat don't link against those libs
3.) it seems you are linking againgst the unicode version of wxWidgets (I see this because you stated wxmsw26u. However: You are missing to declare wxUSE_UNICODE in the defines which I would recommend.

With regards, Morten.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version