lettier / lambda-lantern

🧙 ‎‎ A 3D game about functional programming patterns. Uses PureScript Native, C++, and Panda3D.

Home Page:https://medium.com/@lettier/how-to-create-3d-games-with-purescript-and-cpp-faabf8f27fe6

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trouble linking on macOS

i-am-the-slime opened this issue · comments

Maybe you can help me figure this out:

I compile with these arguments:

make \
  CXXFLAGS=" \
    -fmax-errors=1 \
    -I/usr/include/python2.7 \
    -I/Developer/Panda3D/include \
    -I/usr/local/Cellar/freetype/2.9.1/include/freetype2" \
  LDFLAGS=" \
    -L/Developer/Panda3D/lib \
    -lp3framework \
    -lpanda \
    -lpandafx \
    -lpandaexpress \
    -lp3dtoolconfig \
    -lp3dtool \
    -lp3pystub \
    -lp3direct \
    -pthread \
    -lpthread"

I receive this output https://gist.github.com/i-am-the-slime/8e34436d69b5024503f4061df69a7e62

Which complains about Undefined symbols for architecture x86_64. I am confused which headers are not there for 64 bits.

I actually get the same problem when forcing the architecture to i386.

ld: warning: The i386 architecture is deprecated for macOS (remove from the Xcode build setting: ARCHS)
Undefined symbols for architecture i386:

Okay, I finally managed. I compiled panda3d myself.
This left me with the following make command:

make \                                                                               10:54:13
                                    CXXFLAGS=" \
                                      -fmax-errors=1 \
                                      -I/usr/include/python2.7 \
                                      -I/Users/mark/code/panda3d/built/include \
                                      -I/usr/local/Cellar/freetype/2.9.1/include/freetype2" \
                                    LDFLAGS=" \
                                      -L/Users/mark/code/panda3d/built/lib \
                                      -lp3framework \
                                      -lpanda \
                                      -lpandafx \
                                      -lpandaexpress \
                                      -lp3dtoolconfig \
                                      -lp3dtool \
                                      -lp3pystub \
                                      -lp3direct \
                                      -pthread \
                                      -lpthread"

Then there were complaints about the shared libraries not being found.
My radical solution is to the lib folder from the self-built panda3d to output.

After that:
dyld: Library not loaded: @loader_path/../Frameworks/Cg.framework/Cg

So on to install that bad-boy from here.

Finally I needed to also copy the etc folder over from panda3d due to

No graphics pipe is available!
Your Config.prc file must name at least one valid panda display
library via load-display or aux-display.

And then...

bildschirmfoto 2018-12-30 um 11 00 30

Hello @i-am-the-slime,

Thank you for trying it out on the Mac.

Nice work!

👍