If I compile a small dylib with nothing special, otool returns:
[MyName@mac 17:46:22 ~/src/sdks]$otool -L libMyName2.dylib
libMyName2.dylib:
/Users/MyName/src/sdks/libMyName2.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
As soon as I simply use a file function like FileSize(), it looks like this:
MyName@mac 17:46:57 ~/src/sdks]$otool -L libMyName2.dylib
libMyName2.dylib:
/Users/MyName/src/sdks/libMyName2.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 159.1.0)
/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.5)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 153.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 52.0.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1094.0.0)
Is this correct? How to prevent? I have not chosen any Subsystem in the IDE or somewhere else.
Kukulkan
PB still using Carbon for file functions?
Re: PB still using Carbon for file functions?
Also, Random() function forces PB to include the whole Cocoa stuff:
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0)
How to generate random numbers and avoid linking the whole Cocoa stuff?
Problem is, that PB throws warning messages if I use a dylib that includes Carbon and/or Cocoa: http://www.purebasic.fr/english/viewtop ... 19&t=54771
Kukulkan
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 17.0.0)
How to generate random numbers and avoid linking the whole Cocoa stuff?
Problem is, that PB throws warning messages if I use a dylib that includes Carbon and/or Cocoa: http://www.purebasic.fr/english/viewtop ... 19&t=54771
Kukulkan
Re: PB still using Carbon for file functions?
I don't know about the other questions you have but when it comes to random number generation, you can use your own generator.Kukulkan wrote:How to generate random numbers and avoid linking the whole Cocoa stuff?
Here's two algorithms I ported myself to PureBasic http://www.purebasic.fr/english/viewtop ... 12&t=49263
you will probably find other ones as well if you do a forum search.
Currently the seed function for both algorithms in the code I linked uses Date() to set an initial seed. If this triggers an unwanted framework, you will have to use something else to set the initial seed.
For example
Code: Select all
ImportC ""
mach_absolute_time.q()
EndImport
mwc256seed(mach_absolute_time())
cmwc4096seed(mach_absolute_time())Windows (x64)
Raspberry Pi OS (Arm64)
Raspberry Pi OS (Arm64)

