Cmake project yields weird link error LINK1104 in Visual Studio
Iulian-Nicu Şerbănoiu <[email protected]> Mon, 23 Jun 2025 00:04:44 +0300
| Newsgroups | gmane.comp.lib.wxwindows.general |
|---|---|
| Message-ID | <CAJ5uX7peDkjw+RK3U=01ca3TuHNwrdniTKSgiOAWz0zBvJovhw@mail.gmail.com> |
Hi,
I have this Cmakelist.txt for the minimal sample. I copied the minimal.cpp
in the folder with the Cmakeflist.txt.
--
CMAKE_MINIMUM_REQUIRED (VERSION 4.0)
PROJECT (minmal)
FIND_PACKAGE(wxWidgets COMPONENTS base core base adv REQUIRED) # other
components can be added
INCLUDE(${wxWidgets_USE_FILE})
ADD_EXECUTABLE(minimal WIN32 minimal.cpp)
target_compile_definitions(minimal PUBLIC _UNICODE UNICODE __WXMSW__ WIN32
_DEBUG _WINDOWS WXUSINGDLL NOPCH)
TARGET_LINK_LIBRARIES(minimal ${wxWidgets_LIBRARIES})
--
I am creating a "b" folder in there. Then going into b and issuing cmake ..
;
I open the generated Visual Studio Solution and I get this error:
--
cannot open file 'C:\code\wxminsample\b\Debug\minimal.exe'
--
If I do a project from scratch in Visual Studio with the defines,
include/lib dirs and the libraries for linking it works well.
I am using latest wxWidgets (3.3.0) and I only compiled the Debug version
using the "build\msw\wx_vc17.sln " (I am using VS 2022 Community Edition).
Has anyone come across this issue?
Thank you,
Iulian
--
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 [email protected].
To view this discussion visit https://groups.google.com/d/msgid/wx-users/CAJ5uX7peDkjw%2BRK3U%3D01ca3TuHNwrdniTKSgiOAWz0zBvJovhw%40mail.gmail.com.