About lib/vc_lib/mswuwx/setup.h Topic is solved
About lib/vc_lib/mswuwx/setup.h
I use VisualStdio 2015 set the "Hello world"project in the windows system project,but it always exit error C1083 :Cannot open include file: '../../../lib/vc_lib/mswud/wx/setup.h': No such file or directory. Then I do some work according to the solution from online forum. What's worse, it add the erro can't open the source file:H:\wxWidgets\wxWidgets-3.1.2\lib\vc_dll\mswud”: No such file or directory. My version is wxWidgets-3.1.2.I have compiled wxWidgets in windows and run other wxWisdgets project。
What's wrong with me ,please tell me the solution!!!!! This is the most difficulty when i learn wxWidgets.
What's wrong with me ,please tell me the solution!!!!! This is the most difficulty when i learn wxWidgets.
Re: About lib/vc_lib/mswuwx/setup.h
After you unpacked wxWidgets you need to build the wxWidgets libraries. Go to <wxdir>/build/msw/ and open wx_vc14.sln.
Select "Build Solution" from the "Build" menu. This will build one configuration (debug).
Switch Configuration to "Release" and build again.
Close VS.
Now go to <wxdir>/samples/minimal/ and open "minimal_vc9.vcproj". Let VS convert the project.
"Build Solution" again. Now you can run the "minimal" sample.
This all should work out of the box.
Select "Build Solution" from the "Build" menu. This will build one configuration (debug).
Switch Configuration to "Release" and build again.
Close VS.
Now go to <wxdir>/samples/minimal/ and open "minimal_vc9.vcproj". Let VS convert the project.
"Build Solution" again. Now you can run the "minimal" sample.
This all should work out of the box.
Use the source, Luke!
Re: About lib/vc_lib/mswuwx/setup.h
It still has old problem C1083: Cannot open include file: '../../../lib/vc_lib/mswud/wx/setup.h when I Build Solution from the <wxdir>/samples/minimal/ and open "minimal_vc9.vcproj".
Re: About lib/vc_lib/mswuwx/setup.h
This still sounds like you either didn't build the wxWidgets libraries (step 1 from my previous post) or you built a different configuration.
Use the source, Luke!
Re: About lib/vc_lib/mswuwx/setup.h
I build the vc_dll not vc_lib,the erro indicate the vc_Lib/mswud/wx/setup.h
Re: About lib/vc_lib/mswuwx/setup.h
Then you either have to re-build wxWidgets itself with the "Debug" configuration, or you need to change the configuration to "Debug DLL" when building the "minimal" sample.
Use the source, Luke!
Re: About lib/vc_lib/mswuwx/setup.h
I use DLL Debug /DLL Release can run the minimal project. Thank you!!! :)But my aims is to build own wxWidgets project .Why there is without DLL Debug /DLL Release in my own project.There is only Debug/Release and it not work.
Re: About lib/vc_lib/mswuwx/setup.h
Building an empty VS studio project with wxWidgets from scratch is not an easy task. A lot of paths, libraries, preprocessor symbols etc. need to be set correctly.
I suggest to copy the "minimal" sample and modify it. As it uses relative paths to find wxWidgets, it won't work out of the box if you copy it to another directory. You need to go through the whole project (in all configurations) and change the relative paths to absolute ones. Or even better to paths that use an environment variable like WXWIN.
For each configuration there are three places where you need to change the path:
C/C++ -> General -> Additional Include Directories
Linker -> General -> Additional Library Directories
Resources -> General -> Additional Include Directories
I suggest to copy the "minimal" sample and modify it. As it uses relative paths to find wxWidgets, it won't work out of the box if you copy it to another directory. You need to go through the whole project (in all configurations) and change the relative paths to absolute ones. Or even better to paths that use an environment variable like WXWIN.
For each configuration there are three places where you need to change the path:
C/C++ -> General -> Additional Include Directories
Linker -> General -> Additional Library Directories
Resources -> General -> Additional Include Directories
Use the source, Luke!
Re: About lib/vc_lib/mswuwx/setup.h
I dare to disagree, it is actually very simple and should be done under five minutes.
The following assumes you have set the WXWIN environment variable correctly, so its value is something like c:\wxwidgets. Obviously, it also expects you built the requested configurations of wxWidgets.
For example, a simple guide below shows a wxWidgets-related MSVS project settings one needs to add for a self-built 32-bit DLL Debug configuration of a wxWidgets app. The titles in bold and italics in sections 1-4 correspond to the Configuration Properties of a project. Section 5 also describes modifications of the project needed for Release, Static build or 64-bit build.
Start with using the "Windows Desktop Wizard" to create a new project (from menu File/New/Project). Select "Desktop Application" as "Application Type" and check "Empty project". Then add at least one C++ file to the project.
1 General
Make sure Character Set is set to "Use Unicode Character Set".
2 C/C++
2.1 General/Additional Include Directories:
Code: Select all
$(WXWIN)\include\msvc; $(WXWIN)\include
Code: Select all
__WXMSW__;WXUSINGDLL;_DEBUG
3 Linker
3.1 General/Additional Library Directories:
When you are using a MSVC-specific include (see step 2.1), all necessary libraries are linked automatically and you do not need to list their names, you just need to tell the linker where they are.
Code: Select all
$(WXWIN)\lib\vc_dll
Set SubSystem as follows, otherwise you will get some odd error about the main() function not found
Code: Select all
Windows (/SUBSYSTEM:WINDOWS)
The resources options may become available only once you add an .rc file to your project. You should have one, if only to add the application icon.
4.1 General/Additional Include Directories:
Code: Select all
$(WXWIN)\include
5.1 Making the wxWidgets DLLs available
If you use the DLL build, you must make the correct wxWidgets DLLs available to your program. Either copy them to the directory where the executable resides or just for running the app from the MSVS in Debugging set the Environment to
Code: Select all
PATH=$(WXWIN)\lib\vc_dll
In the preprocessor definitions (see step 2.2) replace
Code: Select all
_DEBUG
Code: Select all
NDEBUG
If you do not want a DLL build, remove this preprocessor definition (see step 2.2)
Code: Select all
WXUSINGDLL
Code: Select all
$(WXWIN)\lib\vc_lib
If you built your libraries in vc_x64_{lib|dll} folder, you must use this folder everywhere instead of vc_{lib|dll} folder.
5.5 DPI Awareness
Last but not least, if your application is DPI-aware (it better be in 2020), you should at least set its DPI Awareness in Manifest Tool/Input and Output to "High DPI Aware". But it may be better to include a proper application manifest, with Windows version compatibilities listed and having PerMonitorV2 awareness there. However, PMv2 DPI awareness support is not that good yet in wxWidgets, see e.g. here .
Prebuilt binaries
If you did not build wxWidgets yourself and are using prebuilt binaries for MSVS 2015/2017/2019/2022 you need to set the linker folder (see step 3.1) to
Code: Select all
$(WXWIN)\lib\vc14x_dll
Code: Select all
$(WXWIN)\lib\vc14x_x64_dll
Code: Select all
wxMSVC_VERSION_ABI_COMPAT
BTW, I expect you read this official guide for setting up wxWidgets apps on MSW?
-
- Earned some good credits
- Posts: 117
- Joined: Wed Apr 27, 2022 10:47 pm
Re: About lib/vc_lib/mswuwx/setup.h
From the post: by PB » Sun Dec 29, 2019 11:37 pm, in the section titled
2.2 Preprocessor/Preprocessor Definitions
Is the below text:
When the line for Preprocessor Definitions is highlighted, there is a drop down arrow display on the right side of that line. When that is clicked, one of the options is: Inherit from parent or project defaults
But, it does not get checked, the user can click on that option and all the text in that line is replaced by the text:
Inherit from parent or project defaults
But this wipes out the text just edited in. So what is the correct setup? What did I miss?
2.2 Preprocessor/Preprocessor Definitions
Is the below text:
I am not able to properly read those instructions. I don’t find a “text edit.”Click on the combobox arrow next to the text edit, choose "<Edit...>" from the menu and in the "Preprocess Definitions" dialog make sure the checkbox "Inherit from parent or project defaults" is checked.
When the line for Preprocessor Definitions is highlighted, there is a drop down arrow display on the right side of that line. When that is clicked, one of the options is: Inherit from parent or project defaults
But, it does not get checked, the user can click on that option and all the text in that line is replaced by the text:
Inherit from parent or project defaults
But this wipes out the text just edited in. So what is the correct setup? What did I miss?
Re: About lib/vc_lib/mswuwx/setup.h
By "text edit", I mean the control for typing the text. The below is from MSVS 2022 but IIRC, it has been the same for many MSVS versions (click the picture to see full size animation): Inherited properties do not replace the user typed ones in the configuration, they get merged. Make sure you have only one Configuration (e.g., Debug DLL) and Platform (e.g., Win32) selected.Bryan Kelly wrote: ↑Tue May 10, 2022 4:18 am From the post: by PB » Sun Dec 29, 2019 11:37 pm, in the section titled
2.2 Preprocessor/Preprocessor Definitions
Is the below text:I am not able to properly read those instructions. I don’t find a “text edit.”Click on the combobox arrow next to the text edit, choose "<Edit...>" from the menu and in the "Preprocess Definitions" dialog make sure the checkbox "Inherit from parent or project defaults" is checked.