In article <AS4PR10MB6110B23632...@AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM> you write: >I was trying to build a (simple) wxWidgets application for x86 platform. >Therefore, I built wxWidgets from source: I choose wx_vc18 solution and >built it as DLL Release - Win32. >I extracted the wxWidgets source code .zip in the folder C:\wx\source_3.3.3 > >When compiling my app, I got a lot of linker error, in particular LNK2002 >"unresolved external symbol..." It's simpler to just use CMake to generate the project and solution. With the below CMakeUserPresets.json file in the wxWidgets source directory, next to CMakePresets.json, the following builds and links everything 32-bit with no problem: First, configure to generate project/solution files: cmake --preset default32 Then you can either build from the solution or with cmake: cmake --build --preset default32 Pay attention to the output from the first command to see where wxWidgets wants to write the project/solution files by default. I place them elsewhere, but omitted that customization to keep this example simple. -- Richard ====== CMakeUserPresets.json { "version": 6, "cmakeMinimumRequired": { "major": 3, "minor": 23, "patch": 0 }, "configurePresets": [ { "name": "default32", "displayName": "Configure with default 32-bit settings", "inherits": [ "with_samples", "with_tests" ], "architecture": { "value": "Win32", "strategy": "set" }, "generator": "Visual Studio 18 2026" } ], "buildPresets": [ { "name": "default32", "displayName": "Build with default 32-bit settings", "configurePreset": "default32" } ], "testPresets": [ { "name": "default32", "displayName": "Test with default 32-bit settings", "configurePreset": "default32", "configuration": "Release", "output": { "outputOnFailure": true } } ], "workflowPresets": [ { "name": "default32", "displayName": "Workflow with default 32-bit settings: configure, build and test", "steps": [ { "type": "configure", "name": "default32" }, { "type": "build", "name": "default32" }, { "type": "test", "name": "default32" } ] } ] } ====== CMakeUserPresets.json -- "The Direct3D Graphics Pipeline" free book <https://urldefense.com/v3/__http://tinyurl.com/d3d-pipeline__;!!EAvW5M_HCdSncw!LpYv-OQnMY-pBmOGiyYgzn-GnaoJqP-W_WSZ8vST3sZXy2m8GQaHJ_3Ctlj5DHJEqXphMWUVXTMN1-_BTRwhSl6jkizBAyU$> The Terminals Wiki <https://urldefense.com/v3/__http://terminals-wiki.org__;!!EAvW5M_HCdSncw!LpYv-OQnMY-pBmOGiyYgzn-GnaoJqP-W_WSZ8vST3sZXy2m8GQaHJ_3Ctlj5DHJEqXphMWUVXTMN1-_BTRwhSl6jVzAfTTU$> The Computer Graphics Museum <https://urldefense.com/v3/__http://computergraphicsmuseum.org__;!!EAvW5M_HCdSncw!LpYv-OQnMY-pBmOGiyYgzn-GnaoJqP-W_WSZ8vST3sZXy2m8GQaHJ_3Ctlj5DHJEqXphMWUVXTMN1-_BTRwhSl6jSWLvJSI$> Legalize Adulthood! (my blog) <https://urldefense.com/v3/__http://legalizeadulthood.wordpress.com__;!!EAvW5M_HCdSncw!LpYv-OQnMY-pBmOGiyYgzn-GnaoJqP-W_WSZ8vST3sZXy2m8GQaHJ_3Ctlj5DHJEqXphMWUVXTMN1-_BTRwhSl6jjVQsERo$> -- Please read https://urldefense.com/v3/__https://www.wxwidgets.org/support/mlhowto.htm__;!!EAvW5M_HCdSncw!LpYv-OQnMY-pBmOGiyYgzn-GnaoJqP-W_WSZ8vST3sZXy2m8GQaHJ_3Ctlj5DHJEqXphMWUVXTMN1-_BTRwhSl6j7zHESy4$ before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com. To view this discussion visit https://urldefense.com/v3/__https://groups.google.com/d/msgid/wx-users/E1wiC3S-000000001F9-34MJ*40shell.xmission.com__;JQ!!EAvW5M_HCdSncw!LpYv-OQnMY-pBmOGiyYgzn-GnaoJqP-W_WSZ8vST3sZXy2m8GQaHJ_3Ctlj5DHJEqXphMWUVXTMN1-_BTRwhSl6jZZNFy0k$.
--
Please read https://www.wxwidgets.org/support/mlhowto.htm before posting.
---
You received this message because you are subscribed to the Google Groups "wx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/wx-users/AS4PR10MB61106EE357E0589CD869A3B59EFD2%40AS4PR10MB6110.EURPRD10.PROD.OUTLOOK.COM.
Note that include\msvc\wx\setup.h eliminates the need to list libraries in a Visual Studio project by using "#pragma comment" directives. One can "compile to preprocessed" to verify that this file is included through the regular wx header hierarchy and that the names are properly expanded. I hadn't noticed this directive before but it can be used to list all includes as they're compiled: https://urldefense.com/v3/__https://learn.microsoft.com/en-us/cpp/build/reference/showincludes-list-include-files?view=msvc-170__;!!EAvW5M_HCdSncw!LW5zpUm3z7i4EkArbswvYy6sGJB5QeqP9Vpv5f0F4qohWl2aJUeOX3MS8MhKd3QYqbaM5Ct9hwB_KmYk1LBMOUybjti8Vg$ -- Please read https://urldefense.com/v3/__https://www.wxwidgets.org/support/mlhowto.htm__;!!EAvW5M_HCdSncw!LW5zpUm3z7i4EkArbswvYy6sGJB5QeqP9Vpv5f0F4qohWl2aJUeOX3MS8MhKd3QYqbaM5Ct9hwB_KmYk1LBMOUwnOuFNGg$ before posting. --- You received this message because you are subscribed to the Google Groups "wx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to wx-users+u...@googlegroups.com. To view this discussion visit https://urldefense.com/v3/__https://groups.google.com/d/msgid/wx-users/cca418ec-2bc4-4eb2-843e-623af98328b5*40sewingwitch.com__;JQ!!EAvW5M_HCdSncw!LW5zpUm3z7i4EkArbswvYy6sGJB5QeqP9Vpv5f0F4qohWl2aJUeOX3MS8MhKd3QYqbaM5Ct9hwB_KmYk1LBMOUwZ2_W0UQ$.