Author Topic: wxWidgets issues  (Read 456 times)

Offline nimbleJS

  • Single posting newcomer
  • *
  • Posts: 2
wxWidgets issues
« on: October 26, 2018, 02:10:11 pm »
I haven't coded in C++ with codeblocks in many years. (since version 8.) - I decided to check things out again but I'm getting an error when using v17.12 with wxWidgets 3.1.1 - This PC and install is totally clean, and I'm seeing the "cannot find debug configuration" error message.

I have followed steps from this forum, wiki on the build process and editing paths, global variables etc.. but the articles are old.. (2016) - Was this issue ever resolved? And why is it still showing up on a clean install?

One final question: Can these widgets be easily separated or are the  dependencies an "all or nothing" deal? I'm interested in playing ONLY with the webView widget for a small project.

Any help would be appreciated. - If anyone has this webView widget working and would be interested in a small project, feel free to contact me. (I'd even pay for your services.)

Thanks in advance!

Steps I ran:

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release

So after posting this message I attempted to build in debug.

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug

And now I'm getting a bunch of errors. "This file should only be included when using Microsoft Visual C++"
Code: [Select]
C:\wx\wx311\build\msw>mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
if not exist ..\..\lib\gcc_dll\mswud mkdir ..\..\lib\gcc_dll\mswud
gcc -c -o gcc_mswuddll\wxregex_regcomp.o -g -O0 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswud -D__WXMSW__  -D_UNICODE   -MTgcc_mswuddll\wxregex_regcomp.o -MFgcc_mswuddll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/platform.h:148:0,
                 from ..\..\include/wx/defs.h:45,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:12:6: error: #error "This file should only be included when using Microsoft Visual C++"
     #error "This file should only be included when using Microsoft Visual C++"
      ^~~~~
In file included from ..\..\include/wx/version.h:16:0,
                 from ..\..\include/wx/setup.h:19,
                 from ..\..\include/wx/platform.h:148,
                 from ..\..\include/wx/defs.h:45,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:115:31: error: pasting "/" and "vc_lib" does not give a valid preprocessing token
         wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
« Last Edit: October 26, 2018, 02:30:38 pm by nimbleJS »

Offline BlueHazzard

  • Developer
  • Lives here!
  • *****
  • Posts: 2062
Re: wxWidgets issues
« Reply #1 on: October 26, 2018, 02:41:34 pm »
Where have you problems?
Don't mix Codeblocks and wxWidgets... For wxWidgets problems this is the wrong place
Quote
One final question: Can these widgets be easily separated or are the  dependencies an "all or nothing" deal? I'm interested in playing ONLY with the webView widget for a small project.
This for example. I do not understand what this has to do with codeblocks.

Quote
This PC and install is totally clean, and I'm seeing the "cannot find debug configuration" error message.

I have followed steps from this forum, wiki on the build process and editing paths, global variables etc.. but the articles are old.. (2016) - Was this issue ever resolved? And why is it still showing up on a clean install?
Please describe more, the exact steps you do...
Is this talking about the wxWidgets wizard?
Have you installed wxWidgets properly?
If this is the wizard can you not jump past this error message? This should work as far as i can remember.

Quote
And now I'm getting a bunch of errors. "This file should only be included when using Microsoft Visual C++"
The release build works?

i am not 100% sure if you can use the provided compiler with 17.12 to compile wx3.1.1



Offline nimbleJS

  • Single posting newcomer
  • *
  • Posts: 2
Re: wxWidgets issues
« Reply #2 on: October 26, 2018, 07:22:46 pm »
Well it has been a while since I have used C++. And as I recall one of my biggest gripes was devs not fully explaining how their compiler is setup, dependencies, linking etc.. So more clearly.. Let me explain this as a story so hopefully you will see it from my point of view and get my brain to "click".

1. I install Code Blocks.
2. I install wxWidgets and follow the build steps.
3. The compiler gripes about the debug configuration.

Searching for the issue, others have reported it back in 2016, but I noticed there was never a real solution to the problem. (step by step.)

(I found another sample project.. that I wanted to try in code-blocks.)
https://github.com/zserge/webview

I downloaded the source... and of course it doesn't work. Missing the WindowsSDK dependencies. Installed them.. Still doesn't work; yet when developers post and share their projects they do very little to explain the dependencies on the PC. It becomes a guessing game; and trial and error to figure out what is installed.

Are there any tips you can provide to clarify this? Is there a "standard" setup that makes sharing projects easier?

I can use code-blocks and build all day with no problem, but once its time to distribute (or use someone else's stuff) it seems very difficult. It makes C/C++ seem a lot less portable than it used to be.

Am I missing something? Like I said, its been a while.. so please, bare with me. :)

Thanks for responding!

Tye
« Last Edit: October 26, 2018, 07:25:42 pm by nimbleJS »

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6359
    • My Best Post
Re: wxWidgets issues
« Reply #3 on: October 27, 2018, 04:11:02 am »
Do you know that Code::Blocks is not a compiler?

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 gtafan

  • Multiple posting newcomer
  • *
  • Posts: 80
Re: wxWidgets issues
« Reply #4 on: November 06, 2018, 04:02:52 pm »
I haven't coded in C++ with codeblocks in many years. (since version 8.) - I decided to check things out again but I'm getting an error when using v17.12 with wxWidgets 3.1.1 - This PC and install is totally clean, and I'm seeing the "cannot find debug configuration" error message.

I have followed steps from this forum, wiki on the build process and editing paths, global variables etc.. but the articles are old.. (2016) - Was this issue ever resolved? And why is it still showing up on a clean install?

One final question: Can these widgets be easily separated or are the  dependencies an "all or nothing" deal? I'm interested in playing ONLY with the webView widget for a small project.

Any help would be appreciated. - If anyone has this webView widget working and would be interested in a small project, feel free to contact me. (I'd even pay for your services.)

Thanks in advance!

Steps I ran:

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=release

So after posting this message I attempted to build in debug.

mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug clean
mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug

And now I'm getting a bunch of errors. "This file should only be included when using Microsoft Visual C++"
Code: [Select]
C:\wx\wx311\build\msw>mingw32-make -f makefile.gcc SHARED=1 UNICODE=1 BUILD=debug
if not exist ..\..\lib\gcc_dll\mswud mkdir ..\..\lib\gcc_dll\mswud
gcc -c -o gcc_mswuddll\wxregex_regcomp.o -g -O0 -mthreads  -DHAVE_W32API_H -DNDEBUG -I..\..\include -I..\..\lib\gcc_dll\mswud -D__WXMSW__  -D_UNICODE   -MTgcc_mswuddll\wxregex_regcomp.o -MFgcc_mswuddll\wxregex_regcomp.o.d -MD -MP ../../src/regex/regcomp.c
In file included from ..\..\include/wx/platform.h:148:0,
                 from ..\..\include/wx/defs.h:45,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:12:6: error: #error "This file should only be included when using Microsoft Visual C++"
     #error "This file should only be included when using Microsoft Visual C++"
      ^~~~~
In file included from ..\..\include/wx/version.h:16:0,
                 from ..\..\include/wx/setup.h:19,
                 from ..\..\include/wx/platform.h:148,
                 from ..\..\include/wx/defs.h:45,
                 from ../../src/regex/regcustom.h:39,
                 from ../../src/regex/regguts.h:38,
                 from ../../src/regex/regcomp.c:33:
..\..\include/wx/setup.h:115:31: error: pasting "/" and "vc_lib" does not give a valid preprocessing token
         wxCONCAT6(../../../lib/, wxLIB_SUBDIR, /, wxTOOLKIT_PREFIX, wxSUFFIX, /wx/setup.h)
But building release, you had no problems, right?

Offline Biplab

  • Developer
  • Lives here!
  • *****
  • Posts: 1874
    • Biplab's Blog
Re: wxWidgets issues
« Reply #5 on: November 08, 2018, 04:54:37 pm »
And now I'm getting a bunch of errors. "This file should only be included when using Microsoft Visual C++"

Answer lies in your question. Somehow you are mixing compilers. The error is saying you are using a header file which is for Microsoft compiler and not for GCC.
Be a part of the solution, not a part of the problem.

Offline stahta01

  • Lives here!
  • ****
  • Posts: 6359
    • My Best Post
Re: wxWidgets issues
« Reply #6 on: November 08, 2018, 06:47:45 pm »
And now I'm getting a bunch of errors. "This file should only be included when using Microsoft Visual C++"

Answer lies in your question. Somehow you are mixing compilers. The error is saying you are using a header file which is for Microsoft compiler and not for GCC.

They likely copied/moved (MSVC version of) setup.h when that is not the correct thing to do.

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