问题标签 [libical]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票
1 回答
1369 浏览

ios - 使用 cmake 为 armv7 和 arm64 编译 libical

我已经完成了为 armv7 编译 libical v1.0 的各种解决方案,但是 github 上可用的最新 libical 库似乎已移至 cmake:

https://github.com/libical/libical

有人可以指导我应该做些什么来编译iOS和Mac(一个胖静态库)吗?我已经能够为 Mac 编译它,但不知道如何为 armv7 和 arm64 做同样的事情。谢谢!

0 投票
1 回答
202 浏览

c - Is there a portable way to get the local system timezone into a libical icaltimetype?

libical seems to only accept the Olsen city name to look up timezones in its database. What I've got that's portable is a struct tm which has a GMT offset and the shorthand 3-4 letter code (EST/EDT etc) but there's no function that accepts that in libical.

I have a really lousy way where I scan the tz list from libical trying to match the tznames, and that will probably work, but I am well aware this is a bad idea. But I haven't found any other way of getting the local timezone into a libical icaltimetype.

Am I missing something simple?

And by portable I mean windows, osx and linux.

This is a c program I'm writing. But I see now that tz offset is not posix, so that won't do.

0 投票
0 回答
10 浏览

c - libical MWE 的链接问题

我正在尝试使用 libical 构建一个 MWE,其中一个示例几乎是从 libical 文档中剪切和粘贴的,如下所示:

但是我遇到了无法解决的链接问题。显然,我正在链接(最新版本的)libical + pthreads。然后我得到了一个未定义的对 ucal_getKeywordValuesForLocale_66 的引用,我可以通过添加 libicui18n.a 来解决它。但后来我得到“icu_66::UnicodeString 的vtable”、“icu_66::UnicodeString::setTo”和“icu_66::~UnicodeString”等未定义的参考错误,这些错误看起来很像与ICU组件相关的C++错误。但是我正在构建一个普通的 C 程序?

我需要哪些库才能使上述 MWE 正常工作?为什么在构建 vanilla C 程序时会出现基于类的链接错误?

我在 Linux Mint 20.2 上,并使用除 libical 本身之外的所有库的 repo 版本。

彼得

编辑:事实上,回答了我自己的问题!

仔细(正确地?)查看输出,未定义的问题与 libicui18n 相关,因此根本不是 iCal 问题。嗬!

解决方法是注意到 iCal 人员提供了一个 pkg-config 脚本,因此添加pkg-config --libs --cflags libical到编译器行是有效的。(我猜 ICU 依赖项是隐式固定的。)