Author Topic: wxPack and cannot find -lwxmsw_core  (Read 7279 times)

Offline SedesGobhani

  • Single posting newcomer
  • *
  • Posts: 6
wxPack and cannot find -lwxmsw_core
« on: August 18, 2009, 12:51:39 am »
Hi;

I installed wxWindows and compiled using Borland.  I got the error about -lwxmsw_core.  I searched the forum for that term and found only one thread, which seemed unresolved.  I then googled and found someone showing how to select build options from the Wizard.  When I use the wizard to create new WxWidgets project I don't get prompted about build options (ie. shared, monolithic, unicode...).  So I read that if you install wxPack you don't have to worry about build options, it just works.  So I installed that and changed the global variable wx base to the default place where wxPack installed, which is C:\SourceCode\Libraries\wxWidgets2.8.  However I still get the -lwxmsw_core error.  The error appears as below:

-------------- Build: Release in fx2gui ---------------
Linking executable: bin\Release\fx2gui.exe
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: cannot find -lwxmsw_core
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 4 seconds)
1 errors, 0 warnings

I've been using Code::Blocks for writing console apps and DLLs but on this problem now I've spent enough time dinking around with it I figured it's time to humble myself and ask for some help.

Thanks,
SG

Offline TDragon

  • Lives here!
  • ****
  • Posts: 943
    • TDM-GCC
Re: wxPack and cannot find -lwxmsw_core
« Reply #1 on: August 18, 2009, 02:00:44 am »
Try the wiki...
https://jmeubank.github.io/tdm-gcc/ - TDM-GCC compiler suite for Windows (GCC 9.2.0 2020-03-08, 32/64-bit, no extra DLLs)

Offline SedesGobhani

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxPack and cannot find -lwxmsw_core
« Reply #2 on: August 18, 2009, 08:53:07 am »
Try the wiki...

Yep.  Solved that, and a few other problems since then.  Now I'm stuck with:
undefined reference to `__Unwind_Resume'

I give up.

Thanks partners.  Always a pleasure.


Online stahta01

  • Lives here!
  • ****
  • Posts: 7590
    • My Best Post
Re: wxPack and cannot find -lwxmsw_core
« Reply #3 on: August 18, 2009, 03:41:12 pm »
Shot in the dark, is your file extension correct?

.c for c code
.cpp for c++ code

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 MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: wxPack and cannot find -lwxmsw_core
« Reply #4 on: August 18, 2009, 04:40:05 pm »
undefined reference to `__Unwind_Resume'
Did you use the very same compiler that wxPack was compiled with?

For example: if wxPack was compiled with GCC4 you cannot do your stuff with GCC3.x.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline SedesGobhani

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxPack and cannot find -lwxmsw_core
« Reply #5 on: August 18, 2009, 07:40:53 pm »
Shot in the dark, is your file extension correct?

.c for c code
.cpp for c++ code

Tim S.


I am actually not using any of my own stuff yet.  This is just files from the Code::Blocks wizard for the starter wx dialog app.  They were probably pretested and I doubt the problem could be there.  

Regarding the compiler that wxPack was compiled with, I'm not sure how I would know.  There are libraries precompiled in something.  There are lots of makefiles for different compilers in the pack.

A little research seemed to indicate it may have something to do with something called an "unwinder" which is not in the main lib but in some secondary lib, but I don't know what lib that would be.  Bottom line seems to be since I don't know how wxPack was compiled, and I don't know what I was doing the first time I compiled wxWidgets, I'm going to have to bite the bullet and recompile it (like 3 hours d'oh!).

I have been looking for documentation on mingw compiler/linker options but haven't been able to locate in the MinGWiki pages.  That's probably a big source of my problem.  Anyone have a pointer to that?  I see lots of examples with different options being used but I can't find them all in one place with documentation.  I bet some make-file genius knows.

Thx,
SG
« Last Edit: August 18, 2009, 07:42:27 pm by SedesGobhani »

Offline SedesGobhani

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxPack and cannot find -lwxmsw_core
« Reply #6 on: August 18, 2009, 08:41:20 pm »
Shot in the dark, is your file extension correct?

.c for c code
.cpp for c++ code

Tim S.


I am actually not using any of my own stuff yet.  This is just files from the Code::Blocks wizard for the starter wx dialog app.  They were probably pretested and I doubt the problem could be there.  

Regarding the compiler that wxPack was compiled with, I'm not sure how I would know.  There are libraries precompiled in something.  There are lots of makefiles for different compilers in the pack.

A little research seemed to indicate it may have something to do with something called an "unwinder" which is not in the main lib but in some secondary lib, but I don't know what lib that would be.  Bottom line seems to be since I don't know how wxPack was compiled, and I don't know what I was doing the first time I compiled wxWidgets, I'm going to have to bite the bullet and recompile it (like 3 hours d'oh!).

I have been looking for documentation on mingw compiler/linker options but haven't been able to locate in the MinGWiki pages.  That's probably a big source of my problem.  Anyone have a pointer to that?  I see lots of examples with different options being used but I can't find them all in one place with documentation.  I bet some make-file genius knows.

Thx,
SG


Well I had a few moments of joy as I did a clean workspace, added -mingw32-g++ to linker options, and rebuild workspace, and it actually compiled and linked.  But when I ran it I got App error message: "The application failed to initialize properly (0xc0000005).  Click on OK to terminate the application."  The build messages also looked a bit odd:

...
Compiling: resource.rc
Compiling: fx2gui3App.cpp
Linking executable: bin\Release\fx2gui3.exe
Info: resolving wxDialogBase::sm_eventTable        by linking to __imp___ZN12wxDialogBase13sm_eventTableE (auto-import)
Info: resolving _wxEmptyString by linking to __imp__wxEmptyString (auto-import)
Info: resolving _wxDefaultSize by linking to __imp__wxDefaultSize (auto-import)
Info: resolving wxStringBase::npos       by linking to __imp___ZN12wxStringBase4nposE (auto-import)
&c...
C:\Program Files\CodeBlocks\MinGW\bin\ld.exe: warning: auto-importing has been activated without --enable-auto-import specified on the command line.
This should work unless it involves constant data structures referencing symbols from auto-imported DLLs.
Output size is 82.00 KB
&c...


Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: wxPack and cannot find -lwxmsw_core
« Reply #7 on: August 18, 2009, 10:21:00 pm »
"The application failed to initialize properly (0xc0000005).  Click on OK to terminate the application." is spitted by the visual studio/C runtime library (most likely).

I've seen that message when some of the libs/dlls are compiled with vc2005/vc2008 but the correct runtime is not installed/found.
Keep in mind that vc2005 runtime is different from vc2005sp1 runtime and from any other hot fixed runtime (there was a hotfix to the runtime :( ).
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline SedesGobhani

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxPack and cannot find -lwxmsw_core
« Reply #8 on: August 19, 2009, 04:03:12 am »
I went back to my first wxWidgets build, and reran the wizard, telling it to use the DLL, and it worked!!! Compiled and linked and ran!

But now I have to drag this big DLL file along with my program, when I wanted the program to be stand alone, so I still need to recompile static.  Crossing fingers!!! 

Thanks folks for being patient with me through all this traumatic experience.   :mrgreen:

 

Offline SedesGobhani

  • Single posting newcomer
  • *
  • Posts: 6
Re: wxPack and cannot find -lwxmsw_core
« Reply #9 on: August 19, 2009, 04:55:58 am »
And it works!
(Now I feel stupid for all them bad things I thought about C::B).

SG