hxcpp
hxcpp copied to clipboard
Linking fails on pcre16_* functions
hxcpp 4.1.15 openSUSE 15.2
Creating /mnt/ssd/spg/highrisers/export/linux/obj/obj/linux64-debug/__pch/haxe/hxcpp.h.gch...
Compiling group: haxe
g++ -Iinclude -c -fvisibility=hidden -g -fpic -fPIC -Wno-overflow -DHX_LINUX -DHXCPP_DEBUG -DHXCPP_M64 -DHXCPP_VISIT_ALLOCS(haxe) -DHXCPP_CHECK_POINTER(haxe) -DHXCPP_STACK_TRACE(haxe) -DHXCPP_STACK_LINE(haxe) -DHXCPP_DEBUGGER(haxe) -DHXCPP_API_LEVEL=331(haxe) -m64 -DHXCPP_M64 -I/home/igor/build/haxe/lib/hxcpp/4,1,15/include ... tags=[haxe,static]
- src/lime/utils/AssetCache.cpp [haxe,release]
Link: ApplicationMain-debug
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: obj/linux64-debug/bef1792d_RegExp.o: in function `_hx_regexp_new_options(String, String)':
/home/igor/build/haxe/lib/hxcpp/4,1,15/src/hx/libs/regexp/RegExp.cpp:170: undefined reference to `pcre16_compile'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: obj/linux64-debug/bef1792d_RegExp.o: in function `pcredata::create16(real_pcre8_or_16*, String, int)':
/home/igor/build/haxe/lib/hxcpp/4,1,15/src/hx/libs/regexp/RegExp.cpp:56: undefined reference to `pcre16_fullinfo'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: obj/linux64-debug/bef1792d_RegExp.o: in function `pcredata::run(String, int, int)':
/home/igor/build/haxe/lib/hxcpp/4,1,15/src/hx/libs/regexp/RegExp.cpp:75: undefined reference to `pcre16_compile'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: /home/igor/build/haxe/lib/hxcpp/4,1,15/src/hx/libs/regexp/RegExp.cpp:82: undefined reference to `pcre16_exec'
/usr/lib64/gcc/x86_64-suse-linux/7/../../../../x86_64-suse-linux/bin/ld: obj/linux64-debug/bef1792d_RegExp.o: in function `pcredata::destroy()':
/home/igor/build/haxe/lib/hxcpp/4,1,15/src/hx/libs/regexp/RegExp.cpp:103: undefined reference to `pcre16_free'
collect2: error: ld returned 1 exit status
The terminal process terminated with exit code: 1
This can be triggered by compiling with hxcpp_smart_strings, and then recompiling with it disabled. For example, it would happen if going from haxe 4+ to haxe 3 or recompiling a haxe 4+ project with -D disable_unicode_strings.
Workaround is to clean out those object files before recompilation with the modified flags.
Perhaps hxcpp could be smarter about this and realise that the flag being unset requires recompiling those files.