0
votes

reproduced steps:

At example file, it gives me three errors:

  • __w64 can only be specified on int, long, and pointer types Example01 C:\Users\Petre\source\repos\vcpkg\installed\x64-windows\include\wx\types.h
  • LNK2019: unresolved external symbol main referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)
  • LNK1120: 1 unresolved externals
1
you mean you didn't do steps 4 and 5 or just step 5? You absolutely have to - nobody but you knows where YOU installed wxWidgets. Please follow instructions as they are written.Igor
I cloned the vcpkg like another repo, my mistake was that instead of typing 'vcpkg integrate install' inside the vcpkg folder, I've typed that inside the project folder. I followed instructions and now I have 6 unresolved externals :(user8108136
please try to build and run minimal sample provided with the library. It already has the solution for MSVC, so you don't need to do anything extra.Igor
The __w64 error is a IntelliSense error and can be safely ignored. That being said, cloning vcpkg and running vcpkg integrate install is sufficient to start using wxWidgets via Visual Studiosegmentation_fault

1 Answers

1
votes

You're trying to build a console subsystem project (with an entry point main), rather than a Windows project (WinMain). You need to change this in the linker options.

The _w64 warning is a separate problem, but it should be a warning, not an error.