Re: Cmake project yields weird link error LINK1104 in Visual Studio

Maarten Bent <[email protected]> Sun, 22 Jun 2025 23:56:50 +0200
Newsgroups gmane.comp.lib.wxwindows.general
Message-ID <[email protected]>
hi,

Maybe minimal.exe is running, so visual studio can't overwrite it?

Maarten


On 22 Jun 2025 23:04, Iulian-Nicu Şerbănoiu wrote:
> 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 
> <https://groups.google.com/d/msgid/wx-users/CAJ5uX7peDkjw%2BRK3U%3D01ca3TuHNwrdniTKSgiOAWz0zBvJovhw%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
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/9b6c2aa4-8160-4392-b76b-75c54206622f%40gmail.com.