Giter VIP home page Giter VIP logo

Comments (7)

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


I don't understand how this can happen, what version of MingW are you using? I compiled this with many mingw versions without any problem. Also TCHAR is char and szFile is char *, so i don't get it. Can you copy the error message?

from efsw.

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).


C:\Qt**\Qt5.3.0**\5.3\ mingw482_32\

Using QtCreator it creates problem.

N:\Projects\qt\app\ThirdParty\FileSystemWatcher\src\efsw\WatcherWin32.cpp:32: error: cannot convert 'TCHAR* {aka wchar_t*}' to 'LPSTR {aka char*}' for argument '5' to 'int WideCharToMultiByte(UINT, DWORD, LPCWCH, int, LPSTR, int, LPCCH, LPBOOL)'
szFile, MAX_PATH - 1, NULL, NULL);
^

from efsw.

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


Oh, that explains everything. And here we have the answer for the issue #28. TCHAR is defined as wchar!

You are compiling with the macro UNICODE defined. And it will convert all the chars to wchar. You should disable that.

from efsw.

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).


Add #undef UNICODE to base.hpp

Solve this problem. And also weird chars.

from efsw.

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).


Solved

from efsw.

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Martín Lucas Golini (Bitbucket: SpartanJ, GitHub: SpartanJ).


The correct solution is changing the type definition of szFile to char.
https://bitbucket.org/SpartanJ/efsw/commits/317fb17f621aa851b88c4fffe8fb45cccd46c228

from efsw.

SpartanJ avatar SpartanJ commented on September 18, 2024

Original comment by Yash pal (Bitbucket: codeyash, GitHub: codeyash).


ok cool Thanks

from efsw.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.