New projects never fit wxWidgets installation settings - won't run inside Code Blocks

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
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Jul 26, 2016 2:00 pm

New projects never fit wxWidgets installation settings - won't run inside Code Blocks

Post by Wanderer82 »

It's so strange... just about 4 weeks ago I created my recent project in Code Blocks which works perfect. Today I tried creating a new project and no matter what settings I choose, the program always claims that the settings don't match any found wxwidgets configuration. If I go ahead I can compile the code but can't execute it. There is an error:

Execution of "filexy" in "xy" failed.

What I know is that I played around with a manifest for execution of the program with admin rights necessary. And this is the interesting thing: If I open the .exe file from its Bin-folder, the program will start but I have to give admin rights.

Thanks,
Thomas
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: New projects never fit wxWidgets installation settings - won't run inside Code Blocks

Post by ONEEYEMAN »

Hi,
What configuration did you use when you build the library?
And how did you configure the new project?
What happen if you re-build the old project? Does it give you any trouble?

Thank you.
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Jul 26, 2016 2:00 pm

Re: New projects never fit wxWidgets installation settings - won't run inside Code Blocks

Post by Wanderer82 »

I built the library a long time ago and I don't know the configuration anymore. But I know that I could create my recent project (some weeks ago) and I've never changed the configuration since then. The only thing I tried was some kind of manifest for executing the program with admin rights. But the project that I can start doesn't start with admin rights, so I'm not sure whether it could have something to do with it. I don't know anymore what I've done exactly.

If I rebuild my "old" aka my recent project, I don't have any problems at all. During compilation I can see the following configuration in my recent project:

In my new program I have the following message during compilation:

mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\BrowserAuswahl.cpp -o obj\Release\BrowserAuswahl.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Create_DesktopLinks.cpp -o obj\Release\Create_DesktopLinks.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\CreateLink.cpp -o obj\Release\CreateLink.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Funktionen.cpp -o obj\Release\Funktionen.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Install_Printer.cpp -o obj\Release\Install_Printer.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\LeO_Config.cpp -o obj\Release\LeO_Config.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\MorePrinters.cpp -o obj\Release\MorePrinters.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Outlook_Autostart.cpp -o obj\Release\Outlook_Autostart.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Printer_Install.cpp -o obj\Release\Printer_Install.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Printer_List.cpp -o obj\Release\Printer_List.o
windres.exe -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -J rc -O coff -i C:\Users\Thomas\DOCUME~1\PROGRA~1\WALLIS~1\resource.rc -o obj\Release\resource.res
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Signatur.cpp -o obj\Release\Signatur.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\SignaturVorschau.cpp -o obj\Release\SignaturVorschau.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Standarddrucker.cpp -o obj\Release\Standarddrucker.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Taskbar_Config.cpp -o obj\Release\Taskbar_Config.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Teams_Config.cpp -o obj\Release\Teams_Config.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Teams_Install.cpp -o obj\Release\Teams_Install.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\User_Info.cpp -o obj\Release\User_Info.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Wallisellen_AutoconfigApp.cpp -o obj\Release\Wallisellen_AutoconfigApp.o
mingw32-g++.exe -Wall -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Wallisellen-Autoconfig\Wallisellen_AutoconfigMain.cpp -o obj\Release\Wallisellen_AutoconfigMain.o
mingw32-g++.exe -LC:\wxWidgets-3.1.0\lib\gcc_dll -o bin\Release\Wallisellen-Autoconfig.exe obj\Release\BrowserAuswahl.o obj\Release\Create_DesktopLinks.o obj\Release\CreateLink.o obj\Release\Funktionen.o obj\Release\Install_Printer.o obj\Release\LeO_Config.o obj\Release\MorePrinters.o obj\Release\Outlook_Autostart.o obj\Release\Printer_Install.o obj\Release\Printer_List.o obj\Release\Signatur.o obj\Release\SignaturVorschau.o obj\Release\Standarddrucker.o obj\Release\Taskbar_Config.o obj\Release\Teams_Config.o obj\Release\Teams_Install.o obj\Release\User_Info.o obj\Release\Wallisellen_AutoconfigApp.o obj\Release\Wallisellen_AutoconfigMain.o obj\Release\resource.res -s -mthreads -lwxmsw31u -mwindows

In my new project I get the following messages:

windres.exe -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -J rc -O coff -i C:\Users\Thomas\DOCUME~1\PROGRA~1\Updater\resource.rc -o obj\Release\resource.res
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Updater\UpdaterApp.cpp -o obj\Release\UpdaterApp.o
mingw32-g++.exe -pipe -mthreads -D__GNUWIN32__ -D__WXMSW__ -DWXUSINGDLL -DwxUSE_UNICODE -O2 -std=c++11 -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -c C:\Users\Thomas\Documents\Programmprojekte\Updater\UpdaterMain.cpp -o obj\Release\UpdaterMain.o
mingw32-g++.exe -LC:\wxWidgets-3.1.0\lib\gcc_dll -o bin\Release\Updater.exe obj\Release\UpdaterApp.o obj\Release\UpdaterMain.o obj\Release\resource.res -s -mthreads -lwxmsw31u -mwindows
ONEEYEMAN
Part Of The Furniture
Part Of The Furniture
Posts: 7458
Joined: Sat Apr 16, 2005 7:22 am
Location: USA, Ukraine

Re: New projects never fit wxWidgets installation settings - won't run inside Code Blocks

Post by ONEEYEMAN »

Hi,
Can you copy the old project somewhere, remove the old sources and add some new code - possibly a minimal sample?

Thank you.
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Jul 26, 2016 2:00 pm

Re: New projects never fit wxWidgets installation settings - won't run inside Code Blocks

Post by Wanderer82 »

I have really no idea what's going on. I did as you said. Copied the project and then removed everything so that I had the exact same program as my other one that I had started from scratch. I even compared all the filed and replaced differing parts. Nothing helped. The copied project compiles and executes fine while the other one doesn't. And the only obvious thing which is really special is that the .exe file from the project which won't run always has the "admin" sign on its icon. If I execute this exe-file and give admin rights the program will start without any problems.
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Jul 26, 2016 2:00 pm

Re: New projects never fit wxWidgets installation settings - won't run inside Code Blocks

Post by Wanderer82 »

I guess I found the problem... although I'm doubting my own sanity. It seems that every time I tried to create a new program I used the same project name (I deleted the old files and its folder but I seem to have created always the same program name as I wanted it to be this one). The name is "updater". It seems that Windows detects these files as only executable with admin rights, so out of Code Blocks I wasn't able to execute it. If I use another program name, everything works fine.

I could have sworn that I have tried a simple test program with another name to find the mistake but now that I see the problem, I'm not so sure anymore about this.

Anyway... I always get the message that my project settings don't match a wxWidgets configuration no matter what I choose. But it might be because the library isn't correctly recognized. I always have to manually change it from 3.0 to 3.1. Think this is a Code Blocks bug.

So my next question is: Is there no way to call my update program "updater.exe" without windows automatically call for admin rights when executing it? I think there are many updaters which are called "update.exe" (for example Microsoft Teams) that don't invoke the admin question window at execution. At least in my experience I rarely have to accept admin rights when updating a program.

EDIT:

I've found the solution. I put a manifest file in the project folder and link it in the resource.rc file with the command "#include "noadmin.manifest"".
Actually I have two files. One wiht the manifest and another .rc file where I put the code:

Code: Select all

#include <windows.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "noadmin.manifest"
But I get a warning when compiling:

windres.exe -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -J rc -O coff -i C:\Users\Thomas\DOCUME~1\PROGRA~1\Updater\resource.rc -o obj\Release\resource.res
windres.exe: warning: 24: 1: 1033: duplicate value

Does anyone know what the problem might be?
Post Reply