Author Topic: Endless problems with wxwidgets  (Read 5336 times)

Offline nc3b

  • Single posting newcomer
  • *
  • Posts: 3
Endless problems with wxwidgets
« on: January 26, 2008, 03:27:49 pm »
Hello everyone. I really like codeblocks (I used to use the old version for small c++ programs). So I downloaded a nightly build, a recent one, and I read about wx support (wxsmith and so on). So I downloaded wxPack and installed it and tried to build an application. I am using visual c++ 2008 express. So first time when I get to the wx library setting I select nothing and move on. I am presented with the very nice wxSmith gui builder and I just click "build". And boom. 33 unresolved externals. I looked around on this forum and saw I have to remove msvcrt or something like that and I did what it said. It still did not work, saying something about double declare _free.. I am getting so confused. Can anyone help me?
« Last Edit: January 31, 2008, 10:33:59 pm by nc3b »

Offline Fozzybear

  • Single posting newcomer
  • *
  • Posts: 3
Re: Endless problems with wxwidgets
« Reply #1 on: January 27, 2008, 03:03:03 am »
Do you have a particular reason to use Visual C++ instead of MinGW? I believe it's possible to compile wx apps in VCC but MinGW is much easier. I would suggest you try this first and check your paths to wxPack and MinGW.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6548
    • My Best Post
Re: Endless problems with wxwidgets
« Reply #2 on: January 28, 2008, 01:19:39 am »
You should be able to use visual c++ 2008 express, but wxWidgets needs to be complied using visual c++ 2008 express. I do not think wxPack does this at the current point in time.

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

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: Endless problems with wxwidgets
« Reply #3 on: January 28, 2008, 08:52:42 am »
You should be able to use visual c++ 2008 express, but wxWidgets needs to be complied using visual c++ 2008 express. I do not think wxPack does this at the current point in time.
Right.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline nc3b

  • Single posting newcomer
  • *
  • Posts: 3
Re: Endless problems with wxwidgets
« Reply #4 on: January 28, 2008, 10:51:55 pm »
I did manage to compile stuff using code blocks, but I had to do some adding and removing of libraries. I had to remove mscvrt and set it to nodefault, and in a certain configuration I had to manually add wxpng, wxtiff and so on.  :)
It really was a pain (and I am not lazy :wink:). The reason I wanted to use vcc this time is that mingw produces so much larger executables, it's almost obscene:)). Leaving the joke behind, I really think that visual c++ 2008 express comes with a rather capable compiler. Until I find I bugging, I will use it from time to time.

Nice work with codeblocks, keep it going that way, I'm really looking forward for a nice linux IDE. Cheers. :D

P.S since I already opened a post, can you also tell me about some good networking examples with wxwidgets? Thank you.

Offline denk_mal

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Endless problems with wxwidgets
« Reply #5 on: January 29, 2008, 07:41:11 am »
The reason I wanted to use vcc this time is that mingw produces so much larger executables, it's almost obscene:)).
This is wrong because you have to install the runtime environment for apps compiled on vcc. Or in other words if you write an portable application - as I do - you can't use vcc.

greetings
denk_mal

Offline troels

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Endless problems with wxwidgets
« Reply #6 on: January 29, 2008, 08:06:53 am »
This is wrong because you have to install the runtime environment for apps compiled on vcc
You are wrong if you are talking about deployment:
It is the other way around. MinGW always links dynamically to the CRT (msvcrt.dll or whatever). In VC you can specify to link the CRT statically -> no particular dll dependencies at all.

Troels

Offline denk_mal

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Endless problems with wxwidgets
« Reply #7 on: January 29, 2008, 08:53:09 am »
This is wrong because you have to install the runtime environment for apps compiled on vcc
You are wrong if you are talking about deployment:
It is the other way around. MinGW always links dynamically to the CRT (msvcrt.dll or whatever). In VC you can specify to link the CRT statically -> no particular dll dependencies at all.

Troels

I am not talking about development, I am talking about the standard user and for the standard user you have to install the Microsoft Visual C++ 2005 Redistributable Package if you have an application deveoped with M$VC express
AFAIK Linking the CRT statically dosn't work on the Express version of VC

denk_mal

Offline troels

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Endless problems with wxwidgets
« Reply #8 on: January 29, 2008, 09:12:05 am »
I am talking about the standard user
Indeed, deployment.

AFAIK Linking the CRT statically dosn't work on the Express version of VC
I know it does because I use it, VC6-VC7-VC8 Express -VC9 Express.

Please check your information before posting.
Please stop spreading misinformation.

Offline denk_mal

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Endless problems with wxwidgets
« Reply #9 on: January 29, 2008, 10:12:22 am »
I am talking about the standard user
Indeed, deployment.

AFAIK Linking the CRT statically dosn't work on the Express version of VC
I know it does because I use it, VC6-VC7-VC8 Express -VC9 Express.
Could you please tell me how you do this? We're here working on a plattformindepended project
(win/linux/mac) and some of us want to use VC on Windows instead of gcc (the debugger is smarter)
Quote
Please check your information before posting.
Please stop spreading misinformation.

http://www.microsoft.com/Downloads/details.aspx?FamilyID=32bc1bee-a3f9-4c13-9c99-220b62a191ee&displaylang=en
You should post your solution to Microsoft also. They even don't know the trick :)

denk_mal

Offline troels

  • Multiple posting newcomer
  • *
  • Posts: 71
Re: Endless problems with wxwidgets
« Reply #10 on: January 29, 2008, 10:37:34 am »
Could you please tell me how you do this?

The /MT compiler option:
Properties->C/C++->Code Generation->Runtime library->Multithreaded (/MT)
Using /MT, "Microsoft Visual C++ 200X Redistributable Package" is not needed, for deployment.

The CRT gets statically linked to your executable, an option MinGW sadly cannot offer, because the CRT code is proprietary.

You should post your solution to Microsoft also. They even don't know the trick :)
This is not a "solution", it is a regular compiler option.

They even don't know the trick :)
Sure they do. Most VC users know too.

Troels

Offline denk_mal

  • Multiple posting newcomer
  • *
  • Posts: 35
Re: Endless problems with wxwidgets
« Reply #11 on: January 29, 2008, 11:32:42 am »
On a logical base this semms to be a real and correct solution.
I've tried it on a 'short jump' in my project and got a lot of unreferenced symbols
(including unresloved external reference wxStringData::Free(void) )
but I'll tried again when I have more time.

thanks
denk_mal


Offline JGM

  • Lives here!
  • ****
  • Posts: 518
  • Got to practice :)
Re: Endless problems with wxwidgets
« Reply #12 on: January 29, 2008, 01:12:43 pm »
The reason I wanted to use vcc this time is that mingw produces so much larger executables, it's almost obscene:)).

A dirty solution would be to use upx ( http://upx.sourceforge.net/ ) only adds a little overhead for decompressing the real executable.

Offline nc3b

  • Single posting newcomer
  • *
  • Posts: 3
Re: Endless problems with wxwidgets
« Reply #13 on: January 29, 2008, 01:14:23 pm »
thank you for the upx idea  :)

Offline Belgabor

  • Multiple posting newcomer
  • *
  • Posts: 91
Re: Endless problems with wxwidgets
« Reply #14 on: February 02, 2008, 06:44:38 am »
Indeed upx does wonders for wxWidgets/MinGW programs. The overhead might actually be offset by the time you save loading the file from hd.