-
Notifications
You must be signed in to change notification settings - Fork 1
This does not compile... #7
Comments
I believe this repository is obsolete? Maybe a notice could be added to redirect users to the C examples instead. Also linking webview/webview#1225 for future reference. |
It's been a long time since I touched this, but it looks like the webview files have been moved, the source file is now |
An amalgamated Although it shouldn't be difficult to update the code here, note that CMake can generate Makefiles if needed so that we don't have to focus too much on that. This could of course still be an example for setting up a project with handwritten Makefiles, but I'm not personally invested in maintaining this. For these reasons I would not object to the idea of archiving this repo. @petabyt, what's your stance on that? |
@phildremi, it does indeed look like this repository is obsolete, although it does give a hint in the Makefile as to what one needs to do: the webview library needs to be compiled with a C++ compiler, which can then be linked with the sample C files. Since it is only adds more confusion for the most part, I think it should likely be archived as you suggest, with better documentation in the main webview repository as to how to use C code, both with and without CMake... @petabyt, When this used to work, it looks like the old version of the webview.h file that was "wget"ed must have been all-inclusive as containing both the headers and the implementation for the webview API functions. Thus, it wouldn't be easy to fix this other than by using the technique that @SteffenL suggested in the 1225# issue for the main repo. In short, it wouldn't be enough just to correct the locations of the C headers, but a separate compilation of the C++ webview library needs to be done... |
The whole point of this repo as I remember it was to show a minimal example for how to compile webview and an example into a binary with incremental compilation. At the time the webview repo only had single line commands with examples that included webview.h, which took 2-3 seconds to compile. If this or a similar example can be moved into the webview repo I think we can delete/archive this. |
The main repo's readme file has a minimal example for C and CMake, and supports incremental builds out of the box. The minimal example in the readme doesn't set up any bindings (maybe it should) but a more elaborate example is available in the repo. If we update the main repo's readme example to include a call to |
@GordonBGood That could be a good addition under the "Non-CMake Usage" section of the main repo's readme. |
I'm not invested in a decision either way. I simply figured it would be pragmatic to focus on examples/docs in the core repo. As for the docs, I'm happy to improve the README. But is a "DIY" build something that needs to be supported officially? As Steffen mentioned, it's expected to build the library with a C++ compiler and the C API is the "official" way to use it [from C]. Obviously, users are free to build as they please. But anything that isn't tested via CI would be difficult to support, IMHO. |
I think that was a good goal, but just hasn't kept up to the changes in the main repository in splitting the header file. I think that showing a minimal way to compile might still be a good goal...
At first I thought that this suggestion along with increasing the "Non-CMake Usage" addition you suggest above would be enough, but then I thought about the case where users would want to use a completely new project (like this repo) that doesn't include the main repository, in which case (with or without a Make file) would need to be something as follows:
for a static build and as follows for a shared build:
with only the last command of each needing to be executed for an "incremental build" after the library has been built. Note that the above two method both work for the current master "webview.h" split file without amalgamating, so amalgamation isn't a requirement... Of course, this can be done with and without the CMake/Make build processes, and could be filled out with the equivalent methods for all (three?) of the supported platforms. Eventually it would be nice if this were extended to be able to call webviews for mobile apps on Android and iOS as well. If this were done, this becomes an independent example of how a new C or C++ project could use the main webview library repo, and perhaps the information in the main repo README becomes redundant and could just link here. |
The readme file should be clear about its requirements and have all the information needed to customize and build it, but preferably without concerning itself too much with compiler details and all the different build systems that exist out there. My wish is for that to be enough for anyone to use their basic knowledge on compiling code with their preferred compiler and build system. CMake was picked as a first-class supported build system to improve convenience for everyone (library developers and consumers) as it's one of the most widely used build systems. Since it can generate Makefiles, Visual Studio solutions and what-not, I would still prefer to not refer people anywhere else (i.e. different repos). I would either make adjustments to this repo in order to make it clear that it's a minimal example specifically for Make, or simply archive it. |
I'll archive it. I stopped using webview years ago and won't be using it again or working on it. Feel free to delete it too. |
The main webview repo directory no longer contains a webview.h file to be downloaded and used, but even if the new location of "core/include/webview" is used so it successfully downloads, it isn't complete for C code as there is no definition for the key webkit API functions for C although they appear in the header file; thus, the compilation completes successfully but the linking cannot because of these missing references...
The text was updated successfully, but these errors were encountered: