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

Build failed #34

Closed
AurevoirXavier opened this issue Jun 7, 2019 · 7 comments
Closed

Build failed #34

AurevoirXavier opened this issue Jun 7, 2019 · 7 comments

Comments

@AurevoirXavier
Copy link

AurevoirXavier commented Jun 7, 2019

c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDetourx64.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDetourx64.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestMemProtector.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestMemProtector.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDisassembler.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDisassembler.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestVFuncSwapHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestVFuncSwapHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestVTableSwapHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestVTableSwapHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\MainTests.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\MainTests.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestIatHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestIatHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestEatHook.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestEatHook.cpp) 
    TestDetourNoTDx64.cpp
    CapstoneDisassembler.cpp
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDetourNoTDx64.cpp) 
c:\users\cestl\desktop\polyhook_2_0\catch.hpp(2481): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDetourNoTDx64.cpp) 
    MemProtector.cpp
    TestEffectTracker.cpp
    PageAllocator.cpp
    ADetour.cpp
    x64Detour.cpp
c:\users\cestl\desktop\polyhook_2_0\asmjit\src\asmjit\x86\x86globals.h(1447): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\UnitTests\TestDetourNoTDx64.cpp) 
    x86Detour.cpp
    AVehHook.cpp
    BreakPointHook.cpp
    HWBreakPointHook.cpp
    VTableSwapHook.cpp
    VFuncSwapHook.cpp
    EatHook.cpp
    IatHook.cpp
    ILCallback.cpp
c:\users\cestl\desktop\polyhook_2_0\asmjit\src\asmjit\x86\x86globals.h(1447): error C2220: warning treated as error - no 'object' file generated (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\sources\ILCallback.cpp) 
c:\users\cestl\desktop\polyhook_2_0\asmjit\src\asmjit\x86\x86globals.h(1447): warning C4819: The file contains a character that cannot be represented in the current code page (936). Save the file in Unicode format to prevent data loss (compiling source file C:\Users\cestl\Desktop\PolyHook_2_0\sources\ILCallback.cpp) 

Build failed.
@AurevoirXavier
Copy link
Author

AurevoirXavier commented Jun 7, 2019

I follow these steps:

  1. git clone --recursive https://github.com/stevemk14ebr/PolyHook_2_0.git
  2. cd PolyHook_2_0
  3. git submodule update --init --recursive
  4. file->open->cmake
  5. tools->options->cmake->general->CMakeSettings.json
  6. cmake->clean all & cmake->cache->delete all & cmake->cache->generate

@stevemk14ebr
Copy link
Owner

stevemk14ebr commented Jun 7, 2019

warning C4819: The file contains a character that cannot be represented in the current code page (936)

This is probably a problem with either how you have git setup, and it's messing with the file encoding. Or perhaps your visual studio setup is weird and it messes with the encoding, or you have your PC set to a weird character set. Either way i just did a fresh clone and it builds fine, try on another machine, it's a problem on your side. Re-Open if it's still broken when you try a different machine.

@AurevoirXavier
Copy link
Author

AurevoirXavier commented Jun 8, 2019

Some problem with '\n' in different code page

go Setting -> language -> regional formatting -> regional setting -> region -> administrative -> change system locale -> check use unicode for worldwide language support

@stevemk14ebr
Copy link
Owner

stevemk14ebr commented Jun 8, 2019

If you change your windows locale of course you're having encoding issues. Are you describing the change that you made to fix your issue, or instructing me to change my system encoding and re-save the polyhook source files.

@AurevoirXavier
Copy link
Author

Just how I fix the problem : )
Btw, any d3d hook example which use this lib?

@stevemk14ebr
Copy link
Owner

That's weird you had to do that, it should be fine without. No i dont have specific examples of that, if you look at the test directory you will see examples of how to use the hooks though, just pass a pointer to the function you want to hook.

@AurevoirXavier
Copy link
Author

I found one thing. When I got the cloned project, it was using UTF-8. After I change its format to UTF-8 with BOM manually, it can be build.

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