Trouble Getting 64-bit Configuration Working

CodeLite installation/troubleshooting forum
User avatar
ColleenKobe
CodeLite Expert
Posts: 130
Joined: Wed Mar 30, 2016 4:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Trouble Getting 64-bit Configuration Working

Post by ColleenKobe »

I am having a tough time trying to get a new 64-bit configuration of a simple CodeLite/wxWidgets/MinGW-64 Windows GUI program up and running. Here is a sample of one of the build logs I've been generating.

Code: Select all

C:\Windows\system32\cmd.exe /C C:/MinGW-w64/mingw32/bin/mingw32-make.exe -e -f  Makefile clean
"----------Cleaning project:[ Main - Debug ]----------"
mingw32-make.exe[1]: Entering directory 'F:/Prototypes_wxw/CreateFile_Tests/Main'

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.

Please use the --wxcfg flag (as in wx-config --wxcfg=gcc_dll/mswud)
or set the environment variable WXCFG (as in WXCFG=gcc_dll/mswud)
to specify which configuration exactly you want to use.
rm -f -r ./Debug/
mingw32-make.exe[1]: Leaving directory 'F:/Prototypes_wxw/CreateFile_Tests/Main'
====0 errors, 0 warnings====
Here is what I've done so far. I am running Windows 10, 64 bits. I loosely based my steps on what I read in https://wiki.wxwidgets.org/Getting_Star ... _wxWidgets. I say "loosely," because the web site assumes the user is using Visual C++.

A. Loaded the 64-bit version of MinGW.
1. Renamed the directory containing my original 32-bit version of MinGW: ren C:\MinGW32 C:\MinGW-32-do not use
2. Downloaded MinGW-64 from https://sourceforge.net/projects/mingw-w64/. Installed it into C:\MinGW-w64.

B. Loaded a clean version of wxWidgets onto my Computer and Compiled it.
1. Renamed the directory containing my original 32-bit compiled versions of wxWidgets: ren C:\wxWidgets C:\wxWidgets--32-do not use
2. Downloaded wxWidgets v3.1.1 from https://www.wxwidgets.org/downloads/. Installed it into C:\wxWidgets.

3. Compiled the wxWidgets. As Administrator, I opened a DOS shell. Navigated to C:\MinGW-w64. Ran the only batch file there, which was build_release_only.bat. It was hard to tell if it stopped because of an error, or because it was done (normally). The last few lines executed were these:

Code: Select all

..\..\include/wx/module.h:21:1: note: in expansion of macro 'WX_DECLARE_USER_EXPORTED_LIST'
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\include/wx/module.h: In member function 'wxModule* const& wxModuleList::const_reverse_iterator::operator*() const':
..\..\include/wx/list.h:926:60: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
                 { return *(pointer_type)m_node->GetDataPtr(); }             \
                                                            ^
..\..\include/wx/list.h:1071:5: note: in expansion of macro 'WX_DECLARE_LIST_4'
     WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP_NONE)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1076:5: note: in expansion of macro 'WX_DECLARE_LIST_3'
     WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1100:5: note: in expansion of macro 'WX_DECLARE_LIST_2'
     WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/module.h:21:1: note: in expansion of macro 'WX_DECLARE_USER_EXPORTED_LIST'
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make: *** [Makefile.gcc:11759: gcc_mswudll\basedll_dynload.o] Error 1

C:\wxWidgets\build\msw>
4. Made a copy of build_release_only.bat and called it build_debug_only.bat. Edited it and globally changed all occurrences of "release" to "debug." Closed build_debug_only.bat.
5. Still in the DOS window as Administrator, I ran build_debug_only.bat. Again, it was hard to tell if it stopped because of a problem, or because it ended normally. The last few lines were:

Code: Select all

..\..\include/wx/module.h: In member function 'wxModule* const& wxModuleList::const_iterator::operator*() const':
..\..\include/wx/list.h:834:60: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
                 { return *(pointer_type)m_node->GetDataPtr(); }             \
                                                            ^
..\..\include/wx/list.h:1071:5: note: in expansion of macro 'WX_DECLARE_LIST_4'
     WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP_NONE)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1076:5: note: in expansion of macro 'WX_DECLARE_LIST_3'
     WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1100:5: note: in expansion of macro 'WX_DECLARE_LIST_2'
     WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/module.h:21:1: note: in expansion of macro 'WX_DECLARE_USER_EXPORTED_LIST'
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
..\..\include/wx/module.h: In member function 'wxModule* const& wxModuleList::const_reverse_iterator::operator*() const':
..\..\include/wx/list.h:926:60: warning: type qualifiers ignored on cast result type [-Wignored-qualifiers]
                 { return *(pointer_type)m_node->GetDataPtr(); }             \
                                                            ^
..\..\include/wx/list.h:1071:5: note: in expansion of macro 'WX_DECLARE_LIST_4'
     WX_DECLARE_LIST_4(T, Tbase, name, nodetype, classexp, WX_LIST_PTROP_NONE)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1076:5: note: in expansion of macro 'WX_DECLARE_LIST_3'
     WX_DECLARE_LIST_3(elementtype, elementtype, listname, nodename, classexp)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/list.h:1100:5: note: in expansion of macro 'WX_DECLARE_LIST_2'
     WX_DECLARE_LIST_2(elementtype, listname, wx##listname##Node, class usergoo)
     ^~~~~~~~~~~~~~~~~
..\..\include/wx/module.h:21:1: note: in expansion of macro 'WX_DECLARE_USER_EXPORTED_LIST'
 WX_DECLARE_USER_EXPORTED_LIST(wxModule, wxModuleList, WXDLLIMPEXP_BASE);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mingw32-make: *** [Makefile.gcc:11759: gcc_mswuddll\basedll_dynload.o] Error 1

C:\wxWidgets\build\msw>
C. Loaded a new version of CodeLite onto my Computer.
1. Uninstalled my original version of CodeLite, keeping my current settings.
2. Downloaded CodeLite v12.0.3 from https://downloads.codelite.org/. Installed it into C:\CodeLite.

D. Updated my system variables.
1. Opened Control Panel, navigated to the Environment Variables page, and--
a. Changed my path. Removed the original references to C:\MinGW. Added these directories to the path:

C:\MinGW-w64\mingw32\bin;
C:\MinGW-w64\mingw32\lib\gcc\i686-w64-mingw32\8.1.0\include\c++;
C:\MinGW-w64\mingw32\lib\gcc\i686-w64-mingw32\8.1.0\include\c++\i686-w64-mingw32;
C:\wxWidgets\include;

b. Added the following environment variables:

CodeLiteDir=C:\CodeLite
WXCFG=gcc_dll\mswud
WXWIN=C:\wxWidgets

2. Closed the Environment Variables page and bubbled out of Control Panel.

E. Rebooted my computer.

F. Navigated to an existing CodeLite workspace containing just one simple project, which was an early "Hello World" type of program. Loaded it into CodeLite.

Because I think a picture is worth 1,000 words, I've taken screen shots of the windows I thought might be the most helpful in debugging the problems I'm facing. So here are the relevant pictures.
00-CodeLite.jpg
01-Compiler and Linker Settings.jpg
02-Envt Settings and Variables.jpg
I did not load the environment variables in CodeLite, because I thought they only needed to be in ONE place (not all): a) in the Windows environment (the way I did); b) In Project Settings, Environment; or c) Settings, Environment Variables.

G. Clicked Build, Clean Workspace. Got the "wxcfg" errors at the beginning of the post.

Suggestions? What do I need to do to resolve the wxcfg problem?

Thank you!
Colleen
You do not have the required permissions to view the files attached to this post.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble Getting 64-bit Configuration Working

Post by eranif »

Do you have a Debug build of wxWidgets? looks like you are attempting to build your application in debug mode with wxWidgets built in Debug , but you don't have this configuration on your machine
Make sure you have read the HOW TO POST thread
User avatar
ColleenKobe
CodeLite Expert
Posts: 130
Joined: Wed Mar 30, 2016 4:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble Getting 64-bit Configuration Working

Post by ColleenKobe »

eranif wrote:Do you have a Debug build of wxWidgets? looks like you are attempting to build your application in debug mode with wxWidgets built in Debug , but you don't have this configuration on your machine
I was downloading whatever was on https://www.wxwidgets.org/downloads/, the Latest Development Release v3.1.1, for Windows Zip (30 MiB). How can I identify whether wxWidgets is a debug version or not?

Anyway, I gave up on the 64-bit version. I'll get back to it after I get everything working in the 32-bit version, because at one point, at least, the 32-bit version built and ran. But I'm still not out of the woods yet.

I'm back to the 32-bit version. I downloaded MinGW and wxWidgets again, recompiled wxWidgets , and am now trying to build the workspace.

I'm ALMOST building again: the two DLL projects build just fine, but the main program build gives me the "error wxuse_any must be defined, please read comment at the top of this file" error. The message the error is referring to tells me the setup.h file is outdated. Well, setup.h can't be outdated, because it was downloaded at the same time all the rest of the files were. How could it be outdated?

Got any idea why I'm getting that error? And why am I getting it for the main program, but the two dlls build just fine?
Here is the build log.
BuildLog.txt
CodeLite v12.0.3
MinGW 32-bit install
wxWidgets 3.1.1
Target platform: Windows 10
You do not have the required permissions to view the files attached to this post.
User avatar
ColleenKobe
CodeLite Expert
Posts: 130
Joined: Wed Mar 30, 2016 4:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble Getting 64-bit Configuration Working

Post by ColleenKobe »

Maybe this question is easier: how can I tell MinGW where to find setup.h?

I have versions of setup.h in the following directories:

Code: Select all

Search Criteria

File name:        setup.h        
Containing text:                 
Look in:          c:\wxWidgets\  


Search Statistics

Found:      10 items (509.49 KB)    
Checked:    10,650 items (1.02 GB)  
Status:     Completed (< 1 sec)     
Completed:  6/11/2018 12:35:10 PM   


Name    Location                           Modified            Size  Type   Hits 
                                                                                 
setup.h c:\wxWidgets\include\msvc\wx\      6/9/2018 9:31:22 AM 9 KB  H File 0    
setup.h c:\wxWidgets\include\wx\android\   6/9/2018 9:31:22 AM 56 KB H File 0    
setup.h c:\wxWidgets\include\wx\gtk\       6/9/2018 9:31:08 AM 58 KB H File 0    
setup.h c:\wxWidgets\include\wx\motif\     6/9/2018 9:31:18 AM 51 KB H File 0    
setup.h c:\wxWidgets\include\wx\msw\       6/9/2018 9:31:03 AM 58 KB H File 0    
setup.h c:\wxWidgets\include\wx\osx\       6/9/2018 9:30:56 AM 53 KB H File 0    
setup.h c:\wxWidgets\include\wx\univ\      6/9/2018 9:30:59 AM 56 KB H File 0    
setup.h c:\wxWidgets\lib\gcc_dll\mswu\wx\  6/9/2018 9:31:03 AM 58 KB H File 0    
setup.h c:\wxWidgets\lib\gcc_dll\mswud\wx\ 6/9/2018 9:31:03 AM 58 KB H File 0    
setup.h c:\wxWidgets\lib\gcc_lib\mswud\wx\ 6/9/2018 9:31:03 AM 58 KB H File 0    

Report generated by Agent Ransack on 6/11/2018 12:37:01 PM
Also, for my main program -> Settings -> Environment, I have:
WXCFG=gcc_dll\mswud
WXWIN=C:\wxWidgets

Does it matter whether I have a forward slash ("/") or backslash ("\") in those paths?

Colleen
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble Getting 64-bit Configuration Working

Post by eranif »

I am not sure what version of wxwidgets you have downloaded, you will need to ask the wxwidgets forum about these DLLs. I, for example, build my own wxwidgets and I dont rely on others to build it for me.
For your other question: on Windows, there is no difference between / and \
Make sure you have read the HOW TO POST thread
User avatar
ColleenKobe
CodeLite Expert
Posts: 130
Joined: Wed Mar 30, 2016 4:31 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Trouble Getting 64-bit Configuration Working

Post by ColleenKobe »

Eranif, thank you for replying.

I, too, build my own wxWidgets environment.

You asked what version of wxWidgets I downloaded. I went to https://www.wxwidgets.org/downloads/ and downloaded the latest development release, 3.1.1, the 30-Mib Windows Zip file.

I unzipped the downloaded file wxWidgets-3.1.1.zip into C:\wxWidgets. When it was done, I navigated to C:\wxWidgets\build, opened a cmd shell as administrator, and ran the batch file below to compile wxWidgets into the debug and release versions:

Code: Select all

echo on
cls
rem ****************************************************************************
rem                        c o m p i l e - w x w . b a t
rem
rem   Programmer:   Colleen Kobe
rem   Date:         March 30, 2016
rem     Modified:   June 12, 2018
rem   Description:  This batch file compiles wxWidgets.  My goal is to compile
rem                 wxWidgets with MinGW, so that I can compile CodeLite.  I
rem                 am following the directions in
rem                 http://codelite.org/Developers/BuildingWxWidgetsWin.
rem ****************************************************************************

rem ============================================================================
rem Make sure the environment contains the correct path and system variables.
rem ============================================================================
set PATH=C:\MinGW\bin;%PATH%
set WXWIN=C:\wxWidgets
set WXCFG=gcc_dll\mswud

rem ============================================================================
rem                           Create the Release Build
rem ============================================================================
C:
cd %WXWIN%\build\msw

mingw32-make -f makefile.gcc setup_h SHARED=1 UNICODE=1 BUILD=release VENDOR=cl

rem ----------------------------------------------------------------------------
rem Verify the contents of setup.h for the release build.
rem ----------------------------------------------------------------------------
rem From the original directions, which expected we would be typing these
rem commands in by hand:
rem
rem     Next, open the file:  \path\to\wxwidgets\lib\gcc_dll\mswu\wx\setup.h and
rem     ensure that wxUSE_GRAPHICS_CONTEXT is set to 1:
rem
rem     # define wxUSE_GRAPHICS_CONTEXT 1
rem
rem In the version of setup.h that results from the build above,
rem wxUSE_GRAPHICS_CONTEXT is set as part of an if-then-else to both 1 and 0.
rem I'm just going to leave the code as-is.

mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=1 BUILD=release VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11"

rem ============================================================================
rem                            Create the Debug Build
rem ============================================================================
C:
cd C:\wxWidgets\build\msw

mingw32-make -f makefile.gcc setup_h SHARED=1 UNICODE=1 BUILD=debug VENDOR=cl

rem ----------------------------------------------------------------------------
rem Verify the contents of setup.h for the debug build.
rem ----------------------------------------------------------------------------
rem From the original directions, which expected we would be typing these
rem commands in by hand:
rem
rem     Next, open the file:  \path\to\wxwidgets\lib\gcc_dll\mswu\wx\setup.h and
rem     ensure that wxUSE_GRAPHICS_CONTEXT is set to 1:
rem
rem     # define wxUSE_GRAPHICS_CONTEXT 1
rem
rem In the version of setup.h that results from the build above,
rem wxUSE_GRAPHICS_CONTEXT is set as part of an if-then-else to both 1 and 0.
rem I'm just going to leave the code as-is.

mingw32-make -j8 -f Makefile.gcc SHARED=1 UNICODE=1 BUILD=debug VENDOR=cl CXXFLAGS="-fno-keep-inline-dllexport -std=c++11"

echo    Done!
I ran the batch file again this morning just to be sure everything I'm telling you now is still true. The batch file ended normally, but when I went to Rebuild this morning, I still get the "wrong setup.h" version problem.

I've struggled with this problem for over a week now. My project engineer is not happy with me. How did I ever have an environment that worked? :cry:
Colleen

P.S. Thanks for letting me know about the "/" vs "\" in file names and paths.
Post Reply