Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi team ,
I had complied a UDF and generated dll and .so file . when I followed the steps from Document , i couldn’t see my UDF in qlik under expression builder>>functions>>UDF .
need some help on this . please let me know if additional details needed
followed this .
https://help.qlik.com/en-US/replicate/November2023/Content/Global_Common/Content/SharedEMReplicate/C...
Hi @kareem15 ,
Thank you for reaching out to Qlik Community.
We have a sample program, MyTransformation.sln, located in the addon folder. Please build it and you will get a dll file. If successful, you should find "prefix_with(X, Y) under "User defined".
If problem persists, please attach your addons_def.json.
Regards,
Desmond
Thank you for the suggestion , let me try that
Do we need to Build the code at the place where Qlik is installed?
in my case Qlik is installed in VDI (remote)
can I build the code in my local and move the Dll file to specific folder and find UDF in qlik ?
Hello @kareem15 ,
The UDTF can be compiled on any Windows machine. However, due to module dependencies, ensure the module is built in Release (not Debug) mode. Once the compilation is complete, copy and distribute the resulting DLLs to the appropriate Replicate machines.
The similar discussion can be found at Qlik replicate sample Functions not showing up in UI.
Hope this helps.
John.
thank you for Response .
I am using MAC and i generated dll using below command :
gcc -shared -O2 -o MyTransformation.dll MyTransformation.c \
-I/opt/homebrew/opt/openssl@3/include \
-L/opt/homebrew/opt/openssl@3/lib -lssl -lcrypto
and copied the dll to - D:\Program Files\Attunity\Replicate\addons\samples\MyTransformation
and restarted the qlik service , still I could not see UDF in qlik
sharing screenshots and addons_def.json below
addons_def.json:
{
"addons":
[
{
"name": "MyPasswordProvider",
"type": "STARTUP",
//"lib_path": "samples\\MyPasswordProvider\\MyPasswordProvider.dll",
//"lib_path": "samples/MyPasswordProvider/MyPasswordProvider.so",
"init_function": "ar_addon_init"
},
{
"name": "MyTransformation",
"type": "STARTUP",
"lib_path": "samples\\MyTransformation\\MyTransformation.dll",
//"lib_path": "samples/MyTransformation/MyTransformation.so",
"init_function": "ar_addon_init"
},
{
"name": qlik_encryption
"type": "STARTUP",
"lib_path": "samples\\MyTransformation\\qlik_encryption.dll",
//"lib_path": "samples/MyTransformation/qlik_encryption.so",
"init_function": "ar_addon_init"
}
]
}
As I am mac user , do i need to generate .so file and use that instead of DLL ?
"As I am mac user , "
Personally I would never ever use a MAC to build a Windows target executable, but that's me. KISS.
Google response to "mac gcc for windows execution" ===>> "To use a Mac's GCC compiler to compile code that will run on Windows, you need to perform a "cross-compilation" by installing a Windows-targeting toolchain on your Mac, typically using a package like MinGW (Minimalist GNU for Windows) or Cygwin which provides a Windows-compatible environment on your Mac, allowing you to compile code that will run on a Windows system" ... Followed by detailed instructions on using -m64 and pointing to Windows libraries.
Unfortunately our post does not give any indication whether something like that is being used.
hth,
Hein.
I switched to windows and build in release mode .
below are the screenshots based on steps for mentioned above :
dll got generated in below folder and we moved it to sample\mytransformation
My repcmd log file :
Still cannot see the UDF , any further help will be appreciated