Discuss Scratch

MagicCrayon9342
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

So, a native web browser. In C++, here's the code.

// main.cc
#include "webview.h"
#ifdef WIN32
int WINAPI WinMain(HINSTANCE hInt, HINSTANCE hPrevInst, LPSTR lpCmdLine,
                   int nCmdShow) {
#else
int main() {
#endif
  webview::webview w(true, nullptr);
  w.set_title("Minimal example");
  w.set_size(480, 320, WEBVIEW_HINT_NONE);
  w.navigate("https://en.m.wikipedia.org/wiki/Main_Page");
  w.run();
  return 0;
}

whilst compiling, I get


Searched the web to no avail!

I'M ON WINDOWS!!!

Last edited by MagicCrayon9342 (May 3, 2022 01:36:35)


Steve0Greatness
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

~ Thanks for being so aggressive, and responding 2 times, the second more angry than the first. ~

Last edited by Steve0Greatness (May 3, 2022 01:53:00)


/hj is the worst tone indicator. It's confusing and ambiguous. I hate it. The point of tone indicators is to indicate tone, or the way that a piece of text should be read, but what does “half joking” mean? Do you just wake up in the morning and think “wow, I really have something I want to talk about seriously but also kinda not, IDK you decide.” It's useless. I hate it. It just provokes a deep rooted anger within me whenever I see it. People just comment /hj as if it makes any sense. It doesn't. Oh wow, it's a tone indicator that's has a relative meaning, how useful, I'll use it in every comment I post. NO. STOP IT. You're a tone indicator, you have only one job, and yet you sit there doing nothing apart angering me.

/srs

^^^ (there's more below)
This one is useful because it tells you that this signature is fully 100% serious. (/srs) Who would've thought that tone indicators needed to tell you something about the piece of text they're attached to? /s

I'm serious, I'm not even going to put multiple (/hj)s a the end of my signature as to mock the previous paragraph for not getting the point of something(like previous version of my signature). /srs
MagicCrayon9342
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

Steve0Greatness wrote:

justjosias wrote:

Maybe you need to install the development version of those libraries? I don't know much about FreeBSD's packaging scheme.
webview/webview#484
I'm on Windows, not FreeBSD. It's entirely irrelevant as it shows a FreeBSD package name not a Windows library.

MagicCrayon9342
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

Steve0Greatness wrote:

justjosias wrote:

Maybe you need to install the development version of those libraries? I don't know much about FreeBSD's packaging scheme.
webview/webview#484
You clearly didn't know what you were doing because you just picked a random supposedly relevant issue request in a Github repository, sent a link with no other context. And, that issue was for FreeBSD. And according to the OP I am running Windows.

Steve0Greatness
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

MagicCrayon9342 wrote:

You clearly didn't know what you were doing because you just picked a random supposedly relevant issue request in a Github repository, sent a link with no other context. And, that issue was for FreeBSD. And according to the OP I am running Windows.
You litterally just added that. Don't expect me to see the future.

/hj is the worst tone indicator. It's confusing and ambiguous. I hate it. The point of tone indicators is to indicate tone, or the way that a piece of text should be read, but what does “half joking” mean? Do you just wake up in the morning and think “wow, I really have something I want to talk about seriously but also kinda not, IDK you decide.” It's useless. I hate it. It just provokes a deep rooted anger within me whenever I see it. People just comment /hj as if it makes any sense. It doesn't. Oh wow, it's a tone indicator that's has a relative meaning, how useful, I'll use it in every comment I post. NO. STOP IT. You're a tone indicator, you have only one job, and yet you sit there doing nothing apart angering me.

/srs

^^^ (there's more below)
This one is useful because it tells you that this signature is fully 100% serious. (/srs) Who would've thought that tone indicators needed to tell you something about the piece of text they're attached to? /s

I'm serious, I'm not even going to put multiple (/hj)s a the end of my signature as to mock the previous paragraph for not getting the point of something(like previous version of my signature). /srs
uwv
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

if this happens it means you're trying to build for use with gtk, webview.h only includes <JavaScriptCore/JavaScript.h> if it's set to compile with gtk. are you compiling with gtk or not? if so then you should download the required library files for gtk and rebuild (as more than likely JavaScriptCore/JavaScript.h will be located there).

#if defined(WEBVIEW_GTK)
//
// ====================================================================
//
// This implementation uses webkit2gtk backend. It requires gtk+3.0 and
// webkit2gtk-4.0 libraries. Proper compiler flags can be retrieved via:
//
//   pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0
//
// ====================================================================
//
#include <JavaScriptCore/JavaScript.h>
#include <gtk/gtk.h>
#include <webkit2/webkit2.h>

i use arch linux (btw) with the linux zen kernel and enjoy writing silly things in silly languages using silly frameworks
MagicCrayon9342
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

uwv wrote:

if this happens it means you're trying to build for use with gtk, webview.h only includes <JavaScriptCore/JavaScript.h> if it's set to compile with gtk. are you compiling with gtk or not? if so then you should download the required library files for gtk and rebuild (as more than likely JavaScriptCore/JavaScript.h will be located there).

#if defined(WEBVIEW_GTK)
//
// ====================================================================
//
// This implementation uses webkit2gtk backend. It requires gtk+3.0 and
// webkit2gtk-4.0 libraries. Proper compiler flags can be retrieved via:
//
//   pkg-config --cflags --libs gtk+-3.0 webkit2gtk-4.0
//
// ====================================================================
//
#include <JavaScriptCore/JavaScript.h>
#include <gtk/gtk.h>
#include <webkit2/webkit2.h>
aren't all libraries supposed to be packaged and be in an OS specific system directory\
Also this application isn't at all being built for GTK yet, only Windows atm.

kccuber
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

MagicCrayon9342 wrote:

aren't all libraries supposed to be packaged and be in an OS specific system directory\
Also this application isn't at all being built for GTK yet, only Windows atm.
But you can still use GTK on Windows. For example Inkscape uses it.


Made using Nord Theme & Inkscape
MagicCrayon9342
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

kccuber wrote:

MagicCrayon9342 wrote:

aren't all libraries supposed to be packaged and be in an OS specific system directory\
Also this application isn't at all being built for GTK yet, only Windows atm.
But you can still use GTK on Windows. For example Inkscape uses it.
I don't want GTK on Windows, no! That is an ugly and incomplete, and lazy solution! That's why I hate Inkscape's unthemed UI on Windows.

uwv
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

MagicCrayon9342 wrote:

(#9)

kccuber wrote:

MagicCrayon9342 wrote:

aren't all libraries supposed to be packaged and be in an OS specific system directory\
Also this application isn't at all being built for GTK yet, only Windows atm.
But you can still use GTK on Windows. For example Inkscape uses it.
I don't want GTK on Windows, no! That is an ugly and incomplete, and lazy solution! That's why I hate Inkscape's unthemed UI on Windows.
using webviews is an ugly, incomplete and lazy solution. you can still style gtk perfectly fine, there's no issues with it whatsoever.

i use arch linux (btw) with the linux zen kernel and enjoy writing silly things in silly languages using silly frameworks
uwv
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

MagicCrayon9342 wrote:

(#7)
aren't all libraries supposed to be packaged and be in an OS specific system directory
no. you have to manually link the libraries you want to use. i'd recommend using cmake or something similar if you aren't already

i use arch linux (btw) with the linux zen kernel and enjoy writing silly things in silly languages using silly frameworks
MagicCrayon9342
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

uwv wrote:

MagicCrayon9342 wrote:

(#7)
aren't all libraries supposed to be packaged and be in an OS specific system directory
no. you have to manually link the libraries you want to use. i'd recommend using cmake or something similar if you aren't already
The documentation nor the setup use any form of cmake rather a raw standard compiler for C/C++ (gcc/g++). Well not standard but GNU and GNU is cool so I use GNU. I have it installed and compatible with Windows through msys2. The issue is with the library, and not being able to find JavaScriptCore/JavaScript.h which I have no idea what library that file correlates to.

uwv
Scratcher
1000+ posts

What? No JavaScriptCore/Javascript.h file?

MagicCrayon9342 wrote:

(#12)

uwv wrote:

MagicCrayon9342 wrote:

(#7)
aren't all libraries supposed to be packaged and be in an OS specific system directory
no. you have to manually link the libraries you want to use. i'd recommend using cmake or something similar if you aren't already
The documentation nor the setup use any form of cmake rather a raw standard compiler for C/C++ (gcc/g++). Well not standard but GNU and GNU is cool so I use GNU. I have it installed and compatible with Windows through msys2. The issue is with the library, and not being able to find JavaScriptCore/JavaScript.h which I have no idea what library that file correlates to.
its part of gtk webviews, i thought this was well established. grab your header files, grab the required libraries and link them.

and just because it doesn't say anything about cmake doesn't mean you shouldn't use cmake. cmake is gonna make your life so much easier when it comes to anything c/c++. it just generates build files and then runs the compiler and linker (in your case g++) with the configuration specified within CMakeLists.txt

Last edited by uwv (May 4, 2022 06:06:27)


i use arch linux (btw) with the linux zen kernel and enjoy writing silly things in silly languages using silly frameworks

Powered by DjangoBB