google / binexport

Export disassemblies into Protocol Buffers
Apache License 2.0
1.05k stars 204 forks source link

[Win Build] fatal error C1083: Cannot open include file: 'third_party/zynamics/binexport/version.h': No such file or directory #1

Closed schomatis closed 8 years ago

schomatis commented 8 years ago

Hi, I'm trying to build the plugin in Windows with the above error. This file that's missing is included in main_plugin.cc and is expected to be in third_party\zynamics\binexport, which is actually a link to the root dir, where the version.h.in file is located. The file is created in the CmakeLists.txt:

configure_file(version.h.in version.h ESCAPE_QUOTES @ONLY)

When using configure_file with relative paths, the input is relative to CMAKE_CURRENT_SOURCE_DIR and the output to CMAKE_CURRENT_BINARY_DIR .

In the Windows build, which is out-of-source, these dirs are not the same, the source dir is the root dir but the binary dir is build_msvc, so version.h ends up there, and not in the root (build_msvc parent's) dir. As a quick (and dirty) fix I've changed the output file path to:

configure_file(version.h.in ../version.h ESCAPE_QUOTES @ONLY)

But looking at the configure file used in the Linux and OS X builds, these seem to be in-source, so the previous change will likely break them, needing a cleaner fix than mine.

Lucas

cblichmann commented 8 years ago

Thanks for the bug report. You could also just do an in-source build -- messy, but it should work. The error was likely left in there because I copied the complete source over to my Windows machine; I must've copied the generated version.h file but did not check it in.

cblichmann commented 8 years ago

This has been fixed.