Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Windows platform #106

Merged
merged 4 commits into from
Nov 7, 2019
Merged

Support Windows platform #106

merged 4 commits into from
Nov 7, 2019

Conversation

hcho3
Copy link
Contributor

@hcho3 hcho3 commented Nov 5, 2019

  • Use _putenv_s() to set environment variables, since setenv() is only available on Linux.
  • Do not set FLAGS_gtest_death_test_style variable in unit tests, since doing so causes compilation failure on Windows.
  • The __declspec(dllexport) specifier needs to attach every single symbol.
  • Move msvc_use_static_runtime() after project() directive.
  • Use Google Test 1.8.1, as 1.8.0 uses std::tr1. (MSVC 2019 dropped support for TR1.)
  • Specify std::ios::binary when opening the *.params file (DL model only). This is because Windows makes distinction between "text files" and "binary files." (Unix does not make this distinction.) Opening the params file as text results in an undefined behavior.

TODO: #104

@hcho3 hcho3 changed the title Fix compilation for Windows platform Support Windows platform Nov 5, 2019
Copy link

@zhiics zhiics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@hcho3 hcho3 mentioned this pull request Nov 7, 2019
@hcho3 hcho3 merged commit 35ed4fa into neo-ai:master Nov 7, 2019
@hcho3 hcho3 deleted the fix_win branch November 7, 2019 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants