# Warning undefined symbol vtkBalloonRepresentation ScaleImage

**URL:** https://discourse.vtk.org/t/warning-undefined-symbol-vtkballoonrepresentation-scaleimage/12509
**Category:** Support
**Created:** [October 19, 2023, 2:16pm UTC](https://discourse.vtk.org/t/warning-undefined-symbol-vtkballoonrepresentation-scaleimage/12509 "2023-10-19T14:16:43Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![cebugdev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cebugdev/32/7803_2.png) [@cebugdev](https://discourse.vtk.org/u/cebugdev)
#### Post date: [October 19, 2023, 2:16pm UTC](https://discourse.vtk.org/t/warning-undefined-symbol-vtkballoonrepresentation-scaleimage/12509/1 "2023-10-19T14:16:43Z")

</div>

I finally manage to build vtk in wasm with QT and reached the linking stage.  
However, I am getting this warning (and not a linker error) during build

```auto
warning: undefined symbol: _ZN24vtkBalloonRepresentation10ScaleImageEPdd (referenced by top-level compiled C/C++ code)
warning: undefined symbol: _ZN24vtkBalloonRepresentation15AdjustImageSizeEPd (referenced by top-level compiled C/C++ code)

```

Bellow are the libraries I linked during build

```auto
 -lvtksys-9.3 \
    -lvtkRenderingVolume-9.3 \
    -lvtkRenderingVolumeOpenGL2-9.3 \
    -lvtkRenderingFreeType-9.3 \
    -lvtkInteractionStyle-9.3 \
    -lvtkCommonCore-9.3 \
    -lvtkCommonDataModel-9.3 \
    -lvtkCommonExecutionModel-9.3 \
    -lvtkCommonMath-9.3 \
    -lvtkCommonTransforms-9.3 \
    -lvtkCommonComputationalGeometry-9.3 \
    -lvtkFiltersCore-9.3 \
    -lvtkFiltersGeneral-9.3 \
    -lvtkFiltersExtraction-9.3 \
    -lvtkFiltersGeometry-9.3 \
    -lvtkFiltersModeling-9.3 \
    -lvtkFiltersSources-9.3 \
    -lvtkImagingHybrid-9.3 \
    -lvtkRenderingAnnotation-9.3 \
    -lvtkRenderingCore-9.3 \
    -lvtkRenderingOpenGL2-9.3 \
    -lvtkIOCore-9.3 \
    -lvtkIOGeometry-9.3 \
    -lvtkIOImage-9.3 \
    -lvtkIOLegacy-9.3 \
    -lvtkIOXML-9.3 \
    -lvtkIOPLY-9.3 \
    -lvtkInteractionWidgets-9.3 \
    -lvtkCommonMisc-9.3 \
    -lvtkIOXMLParser-9.3 \
    -lvtkpng-9.3 \
    -lvtkCommonSystem-9.3 \
    -lvtkCommonColor-9.3 \
    -lvtkzlib-9.3 \
    -lvtkjpeg-9.3 \
    -lvtkexpat-9.3 \
    -lvtkRenderingHyperTreeGrid-9.3 \
    -lvtkpugixml-9.3 \
    -lvtkImagingCore-9.3 \
    -lvtkFiltersHyperTree-9.3 \
    -lvtkFiltersHybrid-9.3	\
    -lvtkfmt-9.3 \
    -lvtkdoubleconversion-9.3	\
    -lvtklz4-9.3 \
    -lvtkRenderingUI-9.3 \
    -lvtklzma-9.3 \

```

Im not sure what library to link to resolve that warning, and I am confuse why is it a warning instead of a link error?

---

<div class="post-metadata">

### Author: ![rexthor](https://discourse.vtk.org/user_avatar/discourse.vtk.org/rexthor/32/6481_2.png) [@rexthor](https://discourse.vtk.org/u/rexthor)
#### Post date: [October 19, 2023, 3:31pm UTC](https://discourse.vtk.org/t/warning-undefined-symbol-vtkballoonrepresentation-scaleimage/12509/2 "2023-10-19T15:31:44Z")

</div>

I don’t have a local installation of the VTK source, but I used to use this Python script with OpenCV to find missing symbols, and what library they were in. Perhaps you could adapt it to your purpose? You run it like `findmissing.py <yourmangledsymbol>`.

```python
#!/usr/bin/env python3

import glob, subprocess, sys

def unmangle(s):
    return subprocess.check_output(["c++filt", mangled_name]).strip()

def is_cpp_name(s):
    return s.find("::") != -1

if __name__ == " __main__":
    shared_objects = glob.glob("*.so")
    mangled_name = sys.argv[1]
    if is_cpp_name(mangled_name):
        nm_flags = "-gDC"
    else:
        nm_flags = "-gD"

    print("demangled: {}".format(unmangle(mangled_name)))
    print("perhaps try linking against:")
    for soname in shared_objects:
        output = subprocess.check_output(["nm", nm_flags , soname])
        for thing in output.decode("utf-8").splitlines():
        if mangled_name in thing [19:].strip():
            print("\t{}".format(soname))

```

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.vtk.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.vtk.org/u/ben.boeckel)
#### Post date: [October 19, 2023, 8:03pm UTC](https://discourse.vtk.org/t/warning-undefined-symbol-vtkballoonrepresentation-scaleimage/12509/3 "2023-10-19T20:03:19Z")

</div>

The problem is that the source file has `inline` on these methods. Can you try this patch?

[https://gitlab.kitware.com/vtk/vtk/-/merge\_requests/10616](https://gitlab.kitware.com/vtk/vtk/-/merge_requests/10616)

---

<div class="post-metadata">

### Author: ![cebugdev](https://discourse.vtk.org/user_avatar/discourse.vtk.org/cebugdev/32/7803_2.png) [@cebugdev](https://discourse.vtk.org/u/cebugdev)
#### Post date: [October 20, 2023, 2:39am UTC](https://discourse.vtk.org/t/warning-undefined-symbol-vtkballoonrepresentation-scaleimage/12509/4 "2023-10-20T02:39:42Z")

</div>

yeah I think this solved the problem, thanks!
