<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div style="margin:0;">Dear all, </div><div style="margin:0;"><br></div><div style="margin:0;">Hi! I have added a new dialog in Impress according to this article <a href="https://wiki.documentfoundation.org/Development/Create_new_dialog_in_Impress">Development/Create new dialog in Impress - The Document Foundation Wiki</a>. However, this article was written in 2013 and too old for the current version. I attached a updated article that suits for version 7.6.0. I hope it can help update the official article. </div><div style="margin:0;"><br></div><div style="margin:0;">After I added the new dialog, I have been trying to use external shared libraries in the dialog source file, according to this <a href="https://github.com/LibreOffice/core/commit/a2ffd71f20e14f797f30223fe29b3ac1e92eafdf">build libtiff กค LibreOffice/core@a2ffd71 (github.com)</a>. The external library I added simply contains a header file which has a helloWorld function and a .so file. I encoutered a problem. </div><div style="margin:0;">------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div style="margin:0;">I found that after doing all steps in the link above, I still need to add [path to my .so library directory] to system environment variable $LD_LIBRARY_PATH to make it work. I tried to add ldflags in RepositoryExternal.mk but it didn't work. (The part that has been commented out). How</div><div style="margin:0;">to make it work without setting system environment variable? I think </div><div style="margin:0;"><span style="font-family: Consolas, "Courier New", monospace; white-space: pre; color: rgb(206, 145, 120);">$(</span><span style="font-family: Consolas, "Courier New", monospace; white-space: pre; color: rgb(220, 220, 170);">call</span><span style="font-family: Consolas, "Courier New", monospace; white-space: pre; color: rgb(206, 145, 120);"> gb_LinkTarget_add_libs,$(</span><span style="font-family: Consolas, "Courier New", monospace; white-space: pre; color: rgb(156, 220, 254);">1</span><span style="font-family: Consolas, "Courier New", monospace; white-space: pre; color: rgb(206, 145, 120);">),</span><span style="font-family: Consolas, "Courier New", monospace; white-space: pre; color: rgb(215, 186, 125);">\</span></div><div style="color: rgb(204, 204, 204); font-family: Consolas, "Courier New", monospace; white-space: pre;"><span style="color: rgb(206, 145, 120);">    -L$(</span><span style="color: rgb(220, 220, 170);">call</span><span style="color: rgb(206, 145, 120);"> gb_UnpackedTarball_get_dir,liba)/lib -la </span><span style="color: rgb(215, 186, 125);">\</span></div><div style="color: rgb(204, 204, 204); font-family: Consolas, "Courier New", monospace; white-space: pre;"><span style="color: rgb(206, 145, 120);">)</span><span style="color: rgb(0, 0, 0); font-family: Arial;"> already specifies the path to the library?</span></div><div style="color: rgb(204, 204, 204); font-family: Consolas, "Courier New", monospace; white-space: pre;"><br></div><div style="color: rgb(204, 204, 204); font-family: Consolas, "Courier New", monospace; white-space: pre;"><span style="color: rgb(0, 0, 0); font-family: Arial; white-space: normal;">Here is the relevant code in </span><span style="color: rgb(0, 0, 0); font-family: Arial;">RepositoryExternal.mk.</span></div><div style="margin:0;"><div style="color: rgb(204, 204, 204); background-color: rgb(31, 31, 31); font-family: Consolas, "Courier New", monospace; line-height: 19px; white-space: pre;"><div><span style="color: #c586c0;">ifneq</span> (<span style="color: #ce9178;">$(</span><span style="color: #9cdcfe;">SYSTEM_LIBA</span><span style="color: #ce9178;">)</span>,)</div><br><div><span style="color: #c586c0;">define</span> <span style="color: #9cdcfe;">gb_LinkTarget__use_liba</span></div><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_set_include,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    </span><span style="color: #569cd6;">$$</span><span style="color: #ce9178;">(INCLUDE) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    $(</span><span style="color: #9cdcfe;">LIBA_CFLAGS</span><span style="color: #ce9178;">) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">)</span></div><br><div># <span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_add_ldflags,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">#     $(</span><span style="color: #9cdcfe;">LIBA_LDFLAGS</span><span style="color: #ce9178;">) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;"># )</span></div><br><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_add_libs,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    $(</span><span style="color: #9cdcfe;">LIBA_LIBS</span><span style="color: #ce9178;">) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">)</span></div><br><div><span style="color: #c586c0;">endef</span></div><br><div><span style="color: #9cdcfe;">gb_ExternalProject__use_liba</span> :=</div><br><div><span style="color: #c586c0;">else</span> <span style="color: #6a9955;"># !SYSTEM_LIBA</span></div><br><div><span style="color: #c586c0;">define</span> <span style="color: #9cdcfe;">gb_LinkTarget__use_liba</span></div><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_set_include,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    $(</span><span style="color: #9cdcfe;">LIBA_CFLAGS</span><span style="color: #ce9178;">) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    </span><span style="color: #569cd6;">$$</span><span style="color: #ce9178;">(INCLUDE) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">)</span></div><br><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_set_include,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    -I$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_UnpackedTarball_get_dir,liba)/src </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    </span><span style="color: #569cd6;">$$</span><span style="color: #ce9178;">(INCLUDE) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">)</span></div><div><span style="color: #c586c0;">ifeq</span> (<span style="color: #ce9178;">$(</span><span style="color: #9cdcfe;">OS</span><span style="color: #ce9178;">)</span>,WNT)</div><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_add_libs,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    $(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_UnpackedTarball_get_dir,liba)/lib/liba$(</span><span style="color: #9cdcfe;">gb_StaticLibrary_PLAINEXT</span><span style="color: #ce9178;">) </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">)</span></div><div><span style="color: #c586c0;">else</span></div><div><span style="color: #6a9955;"># $(call gb_LinkTarget_add_ldflags,$(1),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #6a9955;">#     -L$(call gb_UnpackedTarball_get_dir,liba)/lib </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #6a9955;"># )</span></div><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_add_libs,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),</span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">    -L$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_UnpackedTarball_get_dir,liba)/lib -la </span><span style="color: #d7ba7d;">\</span></div><div><span style="color: #ce9178;">)</span></div><div><span style="color: #c586c0;">endif</span></div><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_LinkTarget_use_external_project,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),liba,full)</span></div><br><div><span style="color: #c586c0;">endef</span></div><br><div><span style="color: #c586c0;">define</span> <span style="color: #9cdcfe;">gb_ExternalProject__use_liba</span></div><div><span style="color: #ce9178;">$(</span><span style="color: #dcdcaa;">call</span><span style="color: #ce9178;"> gb_ExternalProject_use_external_project,$(</span><span style="color: #9cdcfe;">1</span><span style="color: #ce9178;">),liba)</span></div><br><div><span style="color: #c586c0;">endef</span></div><br><div><span style="color: #c586c0;">endif</span> <span style="color: #6a9955;"># !SYSTEM_LIBA</span></div></div></div><div style="margin:0;">------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------</div><div style="margin:0;"><br></div><div style="margin:0;">Could anyone give me some clues about this problem? Thanks! </div><div style="margin:0;"><br></div><div style="margin:0;"><br></div><div style="margin:0;">Best wishes,</div><div style="margin:0;">Jingze Xu</div></div>