DGh0st / HSWidgets

Add options to display widgets right on your homescreen.
MIT License
37 stars 12 forks source link

HSWidgets-structs.h:3:2: error: unknown type name 'NSUInteger' NSUInteger row; #12

Open drflax opened 3 years ago

drflax commented 3 years ago

Hi and thx alot for your work, I write because I'm trying to replicate the practice of your widget creation doc and alway get this error and can not compile. This is the log of make:

==> Notice: Build may be slow as Theos isn’t using all available CPU cores on this computer. Consider upgrading GNU Make: https://github.com/theos/theos/wiki/Parallel-Building

Making all for bundle HSCustomWidget1… ==> Copying resource directories into the bundle wrapper… ==> Compiling HSCustomWidget1ViewController.mm (armv7)… In file included from HSCustomWidget1ViewController.mm:1: In file included from ./HSCustomWidget1ViewController.h:1: In file included from /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgetViewController.h:1: /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:3:2: error: unknown type name 'NSUInteger' NSUInteger row; ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:4:2: error: unknown type name 'NSUInteger' NSUInteger col; ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:9:53: error: unknown type name 'NSUInteger' static inline HSWidgetPosition HSWidgetPositionMake(NSUInteger row, NSUInteger col) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:9:69: error: unknown type name 'NSUInteger' static inline HSWidgetPosition HSWidgetPositionMake(NSUInteger row, NSUInteger col) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:16:15: error: unknown type name 'BOOL' static inline BOOL HSWidgetPositionEqualsPosition(HSWidgetPosition first, HSWidgetPosition second) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:20:79: error: unknown type name 'NSInteger' static inline HSWidgetPosition HSWidgetPositionAdd(HSWidgetPosition position, NSInteger rows, NSInteger cols) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:20:95: error: unknown type name 'NSInteger' static inline HSWidgetPosition HSWidgetPositionAdd(HSWidgetPosition position, NSInteger rows, NSInteger cols) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:27:15: error: unknown type name 'BOOL' static inline BOOL HSWidgetPositionIsValid(HSWidgetPosition position, NSUInteger maxRows, NSUInteger maxCols) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:27:71: error: unknown type name 'NSUInteger' static inline BOOL HSWidgetPositionIsValid(HSWidgetPosition position, NSUInteger maxRows, NSUInteger maxCols) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:27:91: error: unknown type name 'NSUInteger' static inline BOOL HSWidgetPositionIsValid(HSWidgetPosition position, NSUInteger maxRows, NSUInteger maxCols) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:32:20: error: unknown type name 'NSUInteger' typedef NS_OPTIONS(NSUInteger, HSWidgetDirection) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:32:32: error: unknown type name 'HSWidgetDirection' typedef NS_OPTIONS(NSUInteger, HSWidgetDirection) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:32:51: error: function definition declared 'typedef' typedef NS_OPTIONS(NSUInteger, HSWidgetDirection) { ^ /Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:32:9: error: C++ requires a type specifier for all declarations typedef NS_OPTIONS(NSUInteger, HSWidgetDirection) {


/Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:33:2: error: use of undeclared identifier 'HSWidgetDirectionNone'
HSWidgetDirectionNone = 0,
^
/Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:34:2: error: use of undeclared identifier 'HSWidgetDirectionLeft'
HSWidgetDirectionLeft = 1 << 0,
^
/Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:35:2: error: use of undeclared identifier 'HSWidgetDirectionUp'
HSWidgetDirectionUp = 1 << 1,
^
/Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:36:2: error: use of undeclared identifier 'HSWidgetDirectionRight'
HSWidgetDirectionRight = 1 << 2,
^
/Users/drf/theos/lib/HSWidgets.framework/Headers/HSWidgets-structs.h:37:2: error: use of undeclared identifier 'HSWidgetDirectionDown'
HSWidgetDirectionDown = 1 << 3
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[3]: *** [/Users/drf/tweaks/hscustomwidget1/.theos/obj/debug/armv7/HSCustomWidget1ViewController.mm.a912d49f.o] Error 1
make[2]: *** [/Users/drf/tweaks/hscustomwidget1/.theos/obj/debug/armv7/HSCustomWidget1.bundle/HSCustomWidget1] Error 2
make[1]: *** [internal-bundle-all_] Error 2
make: *** [HSCustomWidget1.all.bundle.variables] Error 2

I'm totally new on this programming so maybe is a easy thing to do but I can not see. Thx in advance

DGh0st commented 3 years ago

NSUInteger (rather any of the NS* classes) are part of the Foundation framework that needs to be manually imported. Theos was updated to not automatically import Foundation or UIKit frameworks hence all the errors.

This would be a theos issue, which I believe few people have been looking into they have just been busy. So the temporary fix would be to import those frameworks manually using @import.

drflax commented 3 years ago

ok I will try