Hi all!
First of all, thanks for the wonderful language that Nim is.
I'm trying to compile a static library project using --os:ios flag. The <include header, library> will then be used for mobile iOS app. However, I am getting weird errors:
Error: type mismatch: got <int>
but expected one of:
proc c_malloc(size: csize_t): pointer
first type mismatch at position: 1
required type for size: csize_t
but expression 'sizeof(SysLockObj)' is of type: int
expression: c_malloc(sizeof(SysLockObj))
make: *** [build/nim_status.a] Error 1
Does anyone have any idea what is this about?
Thanks!
-
iffy1
(orginal)
[2020-09-04T22:04:39+02:00]
view original
I'm getting the same error when using Nim 1.2.6 but not when using Nim 1.0.6:
$ nim objc --os:macosx -d:ios -d:iPhone -d:appBundleIdentifier=org.wiish.webview --cpu:amd64 -d:simulator --warning[LockLevel]:off --verbosity:0 --hint[Pattern]:off --parallelBuild:0 --threads:on --tlsEmulation:off --out:dist/ios/WiishWebview.app/executable --nimcache:nimcache --noMain --passL:-mios-simulator-version-min=13.2 --passL:-isysroot --passL:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk --passC:-mios-simulator-version-min=13.2 --passC:-isysroot --passC:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator13.2.sdk ./main_mobile.nim
Hint: system [Processing]
/Users/matt/.choosenim/toolchains/nim-1.2.6/lib/system/syslocks.nim(154, 33) Error: type mismatch: got <int>
but expected one of:
proc c_malloc(size: csize_t): pointer
first type mismatch at position: 1
required type for size: csize_t
but expression 'sizeof(SysLockObj)' is of type: int
expression: c_malloc(sizeof(SysLockObj))
/Users/matt/m/wiish/src/wiish.nim(96) wiish
Did you ever find a workaround/fix?
-
dom96
(orginal)
[2020-09-04T23:33:10+02:00]
view original
Sounds like a possible regression that might be worth looking into and/or reporting on Github
-
shirleyquirk
(orginal)
[2020-09-05T02:06:24+02:00]
view original
pr submitted :)
-
shirleyquirk
(orginal)
[2020-09-06T01:37:43+02:00]
view original
Hopefully this is now fixed in devel, please let me know if not