3
votes

I added CODENAME SOCKETS LIBRARY to my codenameone project - but then the build on the CN1 build-Server failed. I added the lib via the preferences page and called refresh CN1 Libs afterwards.

This error is logged (part of the text):

'ca_weblite_codename1_net_Socket.h' file not found
#import "ca_weblite_codename1_net_Socket.h"
...
The following build commands failed:
CompileC build/Build/Intermediates.noindex/ArchiveIntermediates/AppStart/IntermediateBuildFilesPath/AppStart.build/Release-iphoneos/AppStart.build/Objects-normal/arm64/ca_weblite_codename1_net_impl_NativeSocketImpl.o AppStart-src/ca_weblite_codename1_net_impl_NativeSocketImpl.m normal arm64 objective-c com.apple.compilers.llvm.clang.1_0.compiler

(1 failure) Process return code is 65

1

1 Answers

1
votes

If you add a cn1lib with native callbacks and don't use it in reachable code your build will fail. The native code calls into the java code to trigger events. Unfortunately the optimizer strips away unused code so you get a compilation error.