I want to build with bazel simple window application for windows.
But I cannot build it with such main function:
int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
I get this error - msvcrtd.lib(exe_main.obj) : error LNK2019: unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ).
I tried to pass /SUBSYSTEM:WINDOWS option to linker with linkopts like this:
cc_binary(
name = "hello-window",
srcs = glob(["*.cpp"]),
copts = ["/D", "_UNICODE", "/D", "UNICODE"],
linkopts = ["/SUBSYSTEM:WINDOWS"],
nocopts = "/J"
)
but I get this error message: "ERROR: D:/projects/bazel/hellowindow/BUILD:5:16: in linkopts attribute of cc_binary rule //:hello-window: could not resolve label '/SUBSYSTEM:WINDOWS' ".
Could someone help me - what am I doing wrong and can I build app with such main function?
Thanks.
--
You received this message because you are subscribed to the Google Groups "bazel-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bazel-discus...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/5d2eb2f1-3b6a-42f6-84ae-76593fa447b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/bazel-discuss/5c3b8327-f63c-42d3-b7bc-a97d83cef353%40googlegroups.com.