Skip to content

Release-mode plugin builds link against Debug libraries #552

Open

Description

@ArslanGapizov
  1. Cloned OSVR-Core repository.

  2. Installed CMake 3.9.0-rc3.

  3. Downloaded OSVR-Core-Snapshot-v0.6-2080-g8a0429a4-build282-vs12-64bit and run add_sdk_to_registry.cmd

  4. Installed OSVR-Runtime-v0.6-2080-g8a0429a4-build377-win-64bit

  5. Downloaded boost_1_64_0-msvc-14.1-64 and installed

  6. Went to OSVR-Core/examples/plugin/selfcontained

D:\develop\OSVR-Core\examples\plugin\selfcontained>mkdir build
D:\develop\OSVR-Core\examples\plugin\selfcontained>cd build
D:\develop\OSVR-Core\examples\plugin\selfcontained\build>cmake -G "Visual Studio 14 2015 Win64" ..
-- The C compiler identification is MSVC 19.0.24215.1
-- The CXX compiler identification is MSVC 19.0.24215.1
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/bin/x86_amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info 
- done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: D:/develop/OSVR-Core/examples/plugin/selfcontained/build`
  1. Opened .sln in build with Visual Studio 2015 and builded it.
1>------ Build started: Project: ZERO_CHECK, Configuration: Release x64 ------
1>  Checking Build System
1>  CMake does not need to re-run because D:/develop/OSVR-Core/examples/plugin/selfcontained/build/CMakeFiles/generate.stamp is up-to-date.
2>------ Build started: Project: com_osvr_example_selfcontained, Configuration: Release x64 ------
2>  Building Custom Rule D:/develop/OSVR-Core/examples/plugin/selfcontained/CMakeLists.txt
2>  CMake does not need to re-run because D:/develop/OSVR-Core/examples/plugin/selfcontained/build/CMakeFiles/generate.stamp is up-to-date.
2>  [osvr_convert_json] Generating string literal header from com_osvr_example_selfcontained.json
2>  com_osvr_example_selfcontained.cpp
2>     Creating library D:/develop/OSVR-Core/examples/plugin/selfcontained/build/Release/com_osvr_example_selfcontained.lib and object D:/develop/OSVR-Core/examples/plugin/selfcontained/build/Release/com_osvr_example_selfcontained.exp
2>  com_osvr_example_selfcontained.vcxproj -> D:\develop\OSVR-Core\examples\plugin\selfcontained\build\bin\osvr-plugins-0\Release\com_osvr_example_selfcontained.dll
3>------ Build started: Project: ALL_BUILD, Configuration: Release x64 ------
3>  Building Custom Rule D:/develop/OSVR-Core/examples/plugin/selfcontained/CMakeLists.txt
3>  CMake does not need to re-run because D:/develop/OSVR-Core/examples/plugin/selfcontained/build/CMakeFiles/generate.stamp is up-to-date.
========== Build: 3 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========
  1. Copied com_osvr_example_selfcontained.dll from build\bin\osvr-plugins-0\Release and pasted it in OSVR\Runtime\bin
  2. Started osvr_server.exe and it failed to load plugin:
June 23 08:44:29.382 info [OSVR]: Logging for C:\Program Files\OSVR\Runtime\bin\osvr_server.exe
June 23 08:44:29.382 info [OSVR Server]: Using default config file - pass a filename on the command line to use a different one.
June 23 08:44:29.382 info [OSVR Server]: Attempting to load config file 'osvr_server_config.json'.
June 23 08:44:29.382 info [OSVR Server]: Constructing server as configured...
June 23 08:44:29.397 info [OSVR Server]: Loading auto-loadable plugins...
June 23 08:44:29.413 warning [PluginHost]: Failed to load plugin com_osvr_example_selfcontained: Failed to load the module C:/Program Files/OSVR/Runtime/bin/osvr-plugins-0/com_osvr_example_selfcontained
June 23 08:44:29.429 info [OSVR Server]: Loading plugins...
June 23 08:44:29.429 info [OSVR Server]: Instantiating configured drivers...

Activity

  1. gfrolov commented on Jul 5, 2017

    @gfrolov
    Contributor

    Hi @ArslanGapizov ,
    It looks like the plugin is not loading because you're building the plugin with VS 2015 against OSVR-Core that was built with VS 2013. I would either build it VS 2013 against the same SDK, or build entire OSVR-Core with VS 2015 and then you can use it to build all new plugins.

    Let me know if you have have any more questions.
    -Georgiy

  2. ArslanGapizov commented on Jul 8, 2017

    @ArslanGapizov
    Author

    Thanks for reply, it works. Also I had to change "Release" build to "RelWithDebInfo".

  3. rpavlik commented on Nov 16, 2017

    @rpavlik
    Member

    It's actually just the config (release vs relwithdebinfo) not the version of VS that's the issue here, FWIW. Thanks for finding this - I just re-found it yesterday, sorry I hadn't seen your issue earlier.

  4. changed the title [-]Can compile plugin, but it fails to load[/-] [+]Release-mode plugin builds link against Debug libraries[/+] on Nov 16, 2017
  5. self-assigned this
    on Nov 16, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions