Dear all,
Hi! I have added a new dialog in Impress according to this article Development/Create new dialog in Impress - The Document Foundation Wiki. 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.
After I added the new dialog, I have been trying to use external shared libraries in the dialog source file, according to this build libtiff · LibreOffice/core@a2ffd71 (github.com). The external library I added simply contains a header file which has a helloWorld function and a .so file. I encoutered a problem.
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
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
to make it work without setting system environment variable? I think
$(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,liba)/lib -la \
) already specifies the path to the library?
Here is the relevant code in RepositoryExternal.mk.
ifneq ($(SYSTEM_LIBA),)
define gb_LinkTarget__use_liba
$(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
$(LIBA_CFLAGS) \
)
# $(call gb_LinkTarget_add_ldflags,$(1),\
# $(LIBA_LDFLAGS) \
# )
$(call gb_LinkTarget_add_libs,$(1),\
$(LIBA_LIBS) \
)
endef
gb_ExternalProject__use_liba :=
else # !SYSTEM_LIBA
define gb_LinkTarget__use_liba
$(call gb_LinkTarget_set_include,$(1),\
$(LIBA_CFLAGS) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_set_include,$(1),\
-I$(call gb_UnpackedTarball_get_dir,liba)/src \
$$(INCLUDE) \
)
ifeq ($(OS),WNT)
$(call gb_LinkTarget_add_libs,$(1),\
$(call gb_UnpackedTarball_get_dir,liba)/lib/liba$(gb_StaticLibrary_PLAINEXT) \
)
else
# $(call gb_LinkTarget_add_ldflags,$(1),\
# -L$(call gb_UnpackedTarball_get_dir,liba)/lib \
# )
$(call gb_LinkTarget_add_libs,$(1),\
-L$(call gb_UnpackedTarball_get_dir,liba)/lib -la \
)
endif
$(call gb_LinkTarget_use_external_project,$(1),liba,full)
endef
define gb_ExternalProject__use_liba
$(call gb_ExternalProject_use_external_project,$(1),liba)
endef
endif # !SYSTEM_LIBA
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Could anyone give me some clues about this problem? Thanks!
Best wishes,
Jingze Xu
Attachment:
adding a new dialog in Impress.docx
Description: application/vnd.openxmlformats-officedocument.wordprocessingml.document