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

problems running metareflect #3

Open
gabyx opened this issue Nov 16, 2018 · 1 comment
Open

problems running metareflect #3

gabyx opened this issue Nov 16, 2018 · 1 comment

Comments

@gabyx
Copy link

gabyx commented Nov 16, 2018

I cannot quite get it to work:
I compiled it with clang8.0.0 (head), it works with some minor CMakeList Adjustments (will send a PR...)

$BD/bin/metareflect test.hxx

Output:

Error while trying to load a compilation database:
Could not auto-detect compilation database for file "test.hxx"
No compilation database found in /Users/gabrielnuetzi/Documents/metareflect/example or any parent directory
fixed-compilation-database: Error while opening fixed database: No such file or directory
json-compilation-database: Error while opening JSON database: No such file or directory
Running without flags.
warning: /Users/gabrielnuetzi/Documents/metareflect/example/test.hxx: 'linker' input unused [-Wunused-command-line-argument]
error: unable to handle compilation, expected exactly one compiler job in ''
Error while processing metareflect/example/test.hxx.

Do you know the source of the problem?
Thanks a lot!

@chena1982
Copy link

chena1982 commented Nov 16, 2018

you need to generate a file compile_commands.json, the content is like that:

 {
    "directory": "C:/EFF/Src/EFFBase",
    "command": "clang-tool -fms-extensions -fms-compatibility -fms-compatibility-version=19  -isystem \"C:/EFF/Include/EFFBase\"  -isystem \"C:/EFF/ThirdPartyLib/boost_1_68_0\"  -isystem \"C:/EFF/ThirdPartyLib\"  -isystem \"C:/EFF/ThirdPartyLib/EASTL-3.12.04/include\"  -isystem \"C:/EFF/ThirdPartyLib/EASTL-3.12.04/test/packages/EABase/include/Common\"  -isystem \"C:/EFF/ThirdPartyLib/yaml-cpp-0.5.3/include\"  -isystem \"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/include\"  -isystem \"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Tools/MSVC/14.15.26726/atlmfc/include\"  -isystem \"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/VS/include\"  -isystem \"C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/ucrt\"  -isystem \"C:/Program Files (x86)/Microsoft Visual Studio/2017/Community/VC/Auxiliary/VS/UnitTest/include\"  -isystem \"C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/um\"  -isystem \"C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/shared\"  -isystem \"C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/winrt\"  -isystem \"C:/Program Files (x86)/Windows Kits/10/Include/10.0.17134.0/cppwinrt\"  -isystem \"C:/Program Files (x86)/Windows Kits/NETFXSDK/4.6.1/Include/um\"  -D _DEBUG  -D _MT  -D _DLL  -D WIN32  -D _WINDOWS  -D EFFBASE_EXPORTS  -D USE_DL_PREFIX  -D NO_MALLINFO  -D YAML_DECLARE_STATIC  -D _UNICODE  -D UNICODE  -D CMAKE_INTDIR=\"Debug\"  -D EFFBase_EXPORTS  -D _WINDLL -std=c++14  \"C:/EFF/Src/EFFBase/EFFUtility.cpp\"",
    "file": "C:/EFF/Src/EFFBase/EFFUtility.cpp"
  },

In the readme, you can find how to use cmake to generate this file.
But if you use vistual studio, you need use a plugin Sourcetrail.

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

No branches or pull requests

2 participants