Page 1 of 1

Linker OSX version error

Posted: Mon Oct 14, 2019 7:13 pm
by benmalartre
Hello forum!
When linking a static library(bullet.a), I get some errors like the one below:

Code: Select all

ld: warning: object file (Window.a(AddKeyboardShortcut.o)) was built for newer OSX version (10.8) than being linked (10.7)
I successfully get rid of the one related to my library by setting the -mmacosx-version-min=10.7 in my cpp project Makefile...

here is the full error message:

Code: Select all

ld: warning: object file (Gadget.a(AddGadgetItem.o)) was built for newer OSX version (10.8) than being linked (10.7)
ld: warning: object file (Gadget.a(Debug.o)) was built for newer OSX version (10.8) than being linked (10.7)
ld: warning: object file (Window.a(AddKeyboardShortcut.o)) was built for newer OSX version (10.8) than being linked (10.7)
ld: warning: object file (Window.a(Debug.o)) was built for newer OSX version (10.8) than being linked (10.7)
ld: warning: object file (Gadget.a(CanvasGadget.o)) was built for newer OSX version (10.8) than being linked (10.7)
ld: warning: object file (Gadget.a(ClearGadgetItems.o)) was built for newer OSX version (10.8) than being linked (10.7)
ld: warning: object file (Gadget.a(CloseGadgetList.o)) was built for newer OSX version (10.8) than being linked (10.7)
...
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@fred or freak
against which OSX version are the PB libs compiled?

Re: Linker OSX version error

Posted: Mon Oct 14, 2019 10:01 pm
by mk-soft
OS Version: xxx
Xcode Version: xxx
Purebasic Version:xxx

If it is an old version of macOS and Xcode. Maybe use an older version of PB.

See after login at Purebasic.com in the museum.

Starting with Xcode 9.0 PB v5.7x should also work.
Better with Xcode Veriosn 10.2 or from macOS Catalina Xcode version 11.1.

Don't forget to update the Command Line Tools of Xcode.

Re: Linker OSX version error

Posted: Tue Oct 15, 2019 1:50 pm
by benmalartre
OS Version: 10.13.6 (MacOS High Sierra, I can't update the OS anymore...)
Xcode Version: 9.3
Purebasic Version: 7.1

I found the source of the problem :oops: :
an imported function in purebasic was not declared in the cpp project :D