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
Wrong types in cef3lib.pas #49
Comments
Thanks for the report. As it says Which version of fpCEF are you using? Somehow the line numbers don't match and I get different compile errors. I hope you are aware, that one needs to have a custom compiled version of CEF with a different string type for this to work correctly. |
Thinking a bit more about the effects of this define, I think a lot more needs to be changed to properly support this. E.g. So unless you have really good reasons for this or provide a patch, I'd say changing this define simply is not supported. |
We are trying to compile one big DLL file from the whole thing, so we can deploy next to our EXE (written under Delphi7). I've thought one problem could maybe caused because the different coding, as we use UTF8 in the whole DLL, and the data exchange is in that format too. Many THANKS for the help! |
Just to be sure: You are using a custom CEF build compiled with CEF_STRING_TYPE_UTF8? Your reasoning of course makes a lot of sense. To properly support changing the string type, two things must happen:
I'm currently working on an update to a newer CEF version, but I will try to make those changes, once the update is done. However, I probably won't "support" this feature, as this would make testing much more difficult for me and compiling CEF does not make much fun 😞 |
Sorry for all the trouble I've caused, thought it would be only a few definitions to correct... and thanks for the quick response again! Currently we are trying a completely different approach to our task: [http://www.cadetill.com/gmlib_en/](GMLib) So maybe we won't need to deal with chromium at all. |
Thanks for your feedback. |
String types are correct and changing the CEF string type should now be possible (I didn't test it though). I didn't touch the examples, although the explicit string conversion needs to be adapted, if the string type is changed. Anyway, in the future (and with fpc> 3.0.0), it is probably better to simply assign strings and leave the string conversion to the compiler. |
If {$DEFINE CEF_STRING_TYPE_UTF8} enabled, and {.$DEFINE CEF_STRING_TYPE_UTF16} disabled >>
some errors prohibit to re-compile.
Like:
cef3lib.pas(390,1) SHOULD BE:
procedure _free_string(str: PCefChar); cconv;
... otherwise this error appears:
cef3lib.pas(399,19) Error: Incompatible types: got "<address of procedure(PWideChar);StdCall>" expected "TCefStringUtf8.<procedure variable type of procedure(PChar);StdCall>"
Result^.dtor := @_free_string;
The text was updated successfully, but these errors were encountered: