TIP: Click on subject to list as thread! ANSI
echo: fidosoft.husky
to: WILFRED VAN VELZEN
from: MICHAEL DUKELSKY
date: 2020-12-05 21:44:00
subject: Compiling htick

Hello Wilfred,

Thursday December 03 2020, Wilfred van Velzen wrote to Developers:

 WV> FYI: I had to make 1 change to the CMakeLists.txt file for huskylib to
 WV> be able to compile htick on my new system:

 WV> ======================================================================
 WV> ===== diff --git a/CMakeLists.txt b/CMakeLists.txt index
 WV> df5c00e..b0fbe1e 100644 -+- a/CMakeLists.txt
 WV> +++ b/CMakeLists.txt
 WV> @@ -36,6 +36,7 @@ if (MSVC)
 WV>    ADD_DEFINITIONS(-DWIN32 -D_WINDOWS -D_CONSOLE
 WV> -D_CRT_SECURE_NO_WARNINGS) else ()
 WV>    ADD_DEFINITIONS(-Wall -DUNIX)
 WV> +  ADD_DEFINITIONS(-fPIC)
 WV>  endif (MSVC)

 WV>  message("-------------------------")
 WV> ======================================================================
 WV> =====

 WV> Otherwise I get linker errors when compiling smapi (and probably the
 WV> other modules too):

 WV> ======================================================================
 WV> =====
 WV> ...
 WV> [ 87%] Building C object CMakeFiles/smapi.dir/src/sq_write.c.o
 WV> [ 93%] Building C object CMakeFiles/smapi.dir/src/structrw.c.o
 WV> [100%] Linking C shared library libsmapi.so
                                     ^^^^^^^^^^^
 WV> /usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/l
 WV> d: /usr/local/lib64/libhusky.a(cvtdate.c.o): relocation R_X86_64_32S
                         ^^^^^^^^^^
I forwarded your message to Alexander Skovpen who wrote CMakeLists.txt for
htick. He answered that
you tried to link shared (i.e. dynamic) library libsmapi.so to the static
library libhusky.a. This was incorrect. Either you build everything statically
or you build everything dynamically.

Michael

... node (at) f1042 (dot) ru
--- GoldED+/LNX 1.1.5-b20170303
* Origin: Moscow, Russia (2:5020/1042)

SOURCE: echomail via QWK@docsplace.org

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.