Minimal Sample in Codeblocks on Win10

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
Post Reply
Frank_WX
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 03, 2018 10:20 pm

Minimal Sample in Codeblocks on Win10

Post by Frank_WX »

I've been able to create an .obj file, but the linker says it cannot open the minimal executable.

I am using wx31, compiled from source as a monolithic ddl. The install instructions say that I can ignore listing libraries, since I'm using a Visual C++ compiler. I am trying to build both a 64-bit Release and a 64-bit DDL Release. Therefore, I only am passing the search path to the linker.

Any suggestion would be appreciated. Regards!
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 550
Joined: Fri Nov 03, 2006 2:00 pm

Re: Minimal Sample in Codeblocks on Win10

Post by stahta01 »

Add the path to the DLLs to the library search list; and, code::blocks will add the library search list to the path while you are running the program inside of code::blocks.

Edit: If you still have problems then look at the build log and maybe post it here if you do not see the problem.
http://wiki.codeblocks.org/index.php/FA ... problem.3F

Tim S.
Frank_WX
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 03, 2018 10:20 pm

Re: Minimal Sample in Codeblocks on Win10

Post by Frank_WX »

Hello Tim,

I've had to restore my AMD64 Win10 desktop system and rebuild the MFC samples. The wxwidgets minimal sample now doesn't compile, let alone try to open minimal.exe. The build log is attached. Any suggestions would be appreciated?!

Also, I've tried compiling your batch build sample from 2015. Inside CB, it fails because it doesn't support the AMD64 processor architecture. The batch files also fail. Any suggestions?!

Regards
Attachments
minimal sample DDL Release build failure.txt
(5.46 KiB) Downloaded 91 times
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 550
Joined: Fri Nov 03, 2006 2:00 pm

Re: Minimal Sample in Codeblocks on Win10

Post by stahta01 »

How did you build wxWidgets? Using make or using visual studio project?

I will try to build the wxWidgets 3.1.1 minimal sample using visual studio under Code::Blocks.
The hope is the confirm the problem is in wxWidgets, Code::Blocks, or MS Visual Compiler.
Edit: Community 2015 is the visual studio I am going to be using.

Edit2: Looks like configuring Code::Blocks to use MS Visual Compiler is beyond what I can figure out.

Tim S.
Frank_WX
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 03, 2018 10:20 pm

Re: Minimal Sample in Codeblocks on Win10

Post by Frank_WX »

I used the instructions from CB to build both wxWidgets from source and CB from SVN source. I used the makefile.gcc.

I am using both VS2017 Community and BuildTools, which are both free from MS. CB has a wiki page that gives instructions about updating the VC compiler (It refers to the VC 2003 Toolkit).

!'m currently trying wxWidget minimal sample in VS. It wll be tomorrow sometme, before I'll have any results.

Regards
stahta01
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 550
Joined: Fri Nov 03, 2006 2:00 pm

Re: Minimal Sample in Codeblocks on Win10

Post by stahta01 »

Frank_WX wrote:I used the instructions from CB to build both wxWidgets from source and CB from SVN source. I used the makefile.gcc.

I am using both VS2017 Community and BuildTools, which are both free from MS. CB has a wiki page that gives instructions about updating the VC compiler (It refers to the VC 2003 Toolkit).

!'m currently trying wxWidget minimal sample in VS. It wll be tomorrow sometme, before I'll have any results.

Regards
Did you build wxWidgets using the VS2017 Community compiler?

If not, then you likely need to.

Are you going to be building an 64 bit or an 32 bit application that uses wxWidgets?

Tim S.
Frank_WX
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 03, 2018 10:20 pm

Re: Minimal Sample in Codeblocks on Win10

Post by Frank_WX »

I used the TDM-GCC-64 Suite to build wxWidgets and CB. I am striving to use wxWidgets in a 64-bit sample app.

It looks like the way i am trying to implement wxWidget is what's causing me all the grief. I was using too many wxWidgets include directories. I have reduced the number with good results. I'm also getting similar results with VS2017.

Thanks for your suggestions. They were greatly appreciated!

Frank
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7477
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: Minimal Sample in Codeblocks on Win10

Post by ONEEYEMAN »

Hi,
Just to add - there is no gain in building wxWidgets as monolithic library. While it still supported - you will have more pain in the long run.

Thank you.
Frank_WX
Earned a small fee
Earned a small fee
Posts: 13
Joined: Fri Aug 03, 2018 10:20 pm

Re: Minimal Sample in Codeblocks on Win10

Post by Frank_WX »

@oneeyeman
Thank you for that little pearl of wisdom!

@Stahta01/Tim S.
Your suggestion to use VC was right-on!

I finally read the install document provided by wxWidgets (I skimmed through it, ignoring most of it, a couple weeks ago). It covered creating the libraries with VS, VC, GCC and Cygwin. I created the 64-bit libraries and compiled the 64-bit minimal sample with VS. Using wxWidgets with Codeblocks, or from the command line or in batch mode should be like a walk in the park.

Thanks, again!

Frank
Post Reply