Author Topic: error using wxwidgets 2.6.3 with C::B  (Read 4739 times)

Offline wedgy

  • Single posting newcomer
  • *
  • Posts: 3
error using wxwidgets 2.6.3 with C::B
« on: July 30, 2006, 02:02:04 pm »
There is this one nagging error which does not seem to go away no matter what paths I give to the compiler and linker.

I have C::B 1.0rc2 AND wx 2.6.3.

when I use default wxwidget template from C::B , there is an error :


Switching to target: default
Linking executable: C:\Program Files\CodeBlocks\Projects\wxWidgets_try2.exe
C:\Program Files\CodeBlocks\bin\..\lib\gcc\mingw32\3.4.4\..\..\..\..\mingw32\bin\ld.exe: cannot find -lwxmsw26
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 1 seconds)
1 errors, 0 warnings

where is this wxmsw26 ? I searched all the wx dirs ...no clue...help needed

Offline Pecan

  • Plugin developer
  • Lives here!
  • ****
  • Posts: 2165
Re: error using wxwidgets 2.6.3 with C::B
« Reply #1 on: July 30, 2006, 02:09:54 pm »
Delete CB 1.0RC2. Yes, completely delete it and look here:


http://forums.codeblocks.org/index.php?board=20.0


Do *NOT* install the nightly *over* 1.0RC2. Use a fresh directory/folder.

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9496
Re: error using wxwidgets 2.6.3 with C::B
« Reply #2 on: July 30, 2006, 02:14:32 pm »
This is a linker error. The linker cannot find the library "wxmsw26". Either you really don't have this or forgot to include the path to this library into you linker directories. I'm not sure, but this: http://forums.codeblocks.org/index.php?topic=3452.msg27200#msg27200 could help...?!
If not, please searcht he forum for "wxmsw26" there are a lot of answers applicable to your question.
Please also have a look here: http://wiki.codeblocks.org/index.php?title=Installing_Code::Blocks_from_source_on_Windows in case you forgot to compile wxWidgets. This has to be done to get the libraries.
With regards, Morten.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: http://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: http://wiki.codeblocks.org/index.php?title=FAQ

Offline wedgy

  • Single posting newcomer
  • *
  • Posts: 3
Re: error using wxwidgets 2.6.3 with C::B
« Reply #3 on: July 31, 2006, 10:54:52 am »
well here's the thing...I recompiled all of wxwidgets 2.6.3 and tried making the sample applications (using make from MSYS) all the ones I tried from the prompt worked absolutely fine. So I don't think any library is missing. Maybe my compiler/linker options in C::B r not well worked out ...any clues as to what I should add or remove there?
In the wx build, i have following lib in /lib directory: libwx_mswd_core-2.6.a ...does it have something to do with wxmsw26?

kauranga

  • Guest
Re: error using wxwidgets 2.6.3 with C::B
« Reply #4 on: July 31, 2006, 11:28:30 am »
Hi, I've been having the same problems. But I can get past the problem finding wxmsw26.
On you project | build options under the linker tab, you'll see the problem library listed "wxmsw26" - but this library doesn't exist. It should be in the \wxWidgets-2.6.3\lib directory or something like that.

But when you built wxWidgets you used different options so it created libwx_mswd_core-2.6.a or something.

If I delete wxmsw26 and replace it with libwx_mswd_core-2.6.a  then the linker starts to work...
At this point I have another linker error : undeclared reference to wxWindow::RegisterHotKey - I've recompiled wxWindows with all sorts of settings... but can't seem to get my system to include the RegisterHotKey function in the build.  I guess I'll have to start over from scratch!

kauranga

  • Guest
Re: error using wxwidgets 2.6.3 with C::B
« Reply #5 on: July 31, 2006, 11:50:57 am »
Oh my latest recompile worked!

When I first tried to get wxWindows installed, I read something which said to copy setup.h from include/wx/msw to include/wx ... but at some stage I changed wxUSE_HOTKEY in one file but not the other... and I think Code::Blocks and wxWidgets were looking at different versions!  Now the two files are the same it works.

Offline wedgy

  • Single posting newcomer
  • *
  • Posts: 3
Re: error using wxwidgets 2.6.3 with C::B
« Reply #6 on: August 01, 2006, 10:37:44 am »
Arrgh!.... :x....finally I got the linker to recognize the file but now this:

Code: [Select]
Project   : wxWidgets application
Compiler  : GNU GCC Compiler (called directly)
Directory : C:\Program Files\CodeBlocks\projects\try2\
--------------------------------------------------------------------------------
Switching to target: default
Linking executable: C:\Program Files\CodeBlocks\projects\try2\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, 4 seconds)
0 errors, 0 warnings
 


where's the prob now?

Offline kidmosey

  • Multiple posting newcomer
  • *
  • Posts: 95
    • MUSITU International
Re: error using wxwidgets 2.6.3 with C::B
« Reply #7 on: August 01, 2006, 01:13:00 pm »
where's the prob now?

I haven't used wxWidgets 2.6.3 for C::B, yet, but I think the same rules apply.  Compile wx as a shared, monolithic library.  If you have a *core library, I don't think it is monolithic and you will need to include all of the other relevant libs, as well.

In addition, keep in mind that 2.6.3 uses a new naming scheme for it's libs, so you will have to edit the default C::B settings for the wxWizard.  This was all a big headache for me, so I just used 2.6.2 until I can integrate 2.6.3 later.
3 years until google knows more than god.

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: error using wxwidgets 2.6.3 with C::B
« Reply #8 on: August 01, 2006, 02:51:35 pm »
where's the prob now?
In wxUSE_UNICODE.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline Angel Portal

  • Multiple posting newcomer
  • *
  • Posts: 34
  • We are in the Country
Re: error using wxwidgets 2.6.3 with C::B
« Reply #9 on: August 02, 2006, 03:17:27 pm »

I am studying the wxWidgets installation, and it says DO NOT USE MSYS!!!

You should take a close look on it.

Angel Portal

[attachment deleted by admin]
Angel Portal - AG
Win:98
wx 2.6.3 MinGW

Offline Ceniza

  • Developer
  • Lives here!
  • *****
  • Posts: 1442
    • CenizaSOFT
Re: error using wxwidgets 2.6.3 with C::B
« Reply #10 on: August 02, 2006, 03:31:31 pm »
Quote from: msw\install.txt
NOTE: The makefile.gcc makefiles are for compilation under MinGW using
      native make and Windows command interpreter (command.com/cmd.exe), they
      won't work in other environments (such as UNIX or Unix-like, e.g. MSYS;
      you have to use configure instead)

That's all I found.

BTW, I've been using MSYS to compile wxWidgets since 2.4.x with no problems (now using 2.6.3-p2).

Just have in mind: use MinGW's make to do it the MinGW way and use MSYS' make to do it the MSYS way (using the provided console).