On Thu, 10 Apr 2025 16:11:07 GMT, Kevin Rushforth <k...@openjdk.org> wrote:
> Fixes a link error that occurs when using C++14 to compile and link JavaFX on > Linux. > > > in function `PlatformSupport::PlatformSupport(JNIEnv_*, _jobject*)': > PlatformSupport.cpp:90: undefined reference to > `PlatformSupport::OBSERVED_SETTINGS' > > > The solution, proposed by @johanvos, is to define > `PlatformSupport::OBSERVED_SETTINGS` in `PlatformSupport.cpp`. > > I have tested this using gcc 13.2 and 14.2 using C++17 and it builds and runs > as expected. Johan has already tested a variant of this on C++14, but I will > wait for his explicit review. Just a note in case anyone else encounters a related runtime error ... When I built JavaFX using either gcc version 7.4.0 on Ubuntu 18.04 LTS or gcc version 9.3.0 on Ubuntu 20.04 LTS, I got the following error at runtime: Exception in thread "main" java.lang.reflect.InvocationTargetException Caused by: java.lang.UnsatisfiedLinkError: libglassgtk3.so: undefined symbol: _ZN15PlatformSupport17OBSERVED_SETTINGSE The runtime error did not occur after I upgraded the build system to gcc version 11.2.0 on Ubuntu 22.04 LTS, so I didn't debug it any further. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1768#issuecomment-2798225280