Linker OSX version error

Mac OSX specific forum
benmalartre
User
User
Posts: 27
Joined: Thu Mar 14, 2013 11:24 am
Location: paris
Contact:

Linker OSX version error

Post 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?
User avatar
mk-soft
Always Here
Always Here
Posts: 5386
Joined: Fri May 12, 2006 6:51 pm
Location: Germany

Re: Linker OSX version error

Post 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.
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
benmalartre
User
User
Posts: 27
Joined: Thu Mar 14, 2013 11:24 am
Location: paris
Contact:

Re: Linker OSX version error

Post 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
Post Reply