Giter VIP home page Giter VIP logo

Comments (9)

bkaradzic avatar bkaradzic commented on August 27, 2024

Can you copy&paste errors you're seeing here? Also version of OSX and GCC/Clang.

from bgfx.

thehyperevilcorp avatar thehyperevilcorp commented on August 27, 2024

Mac OS X: 10.7.5
XCode: 4.6.3 (4H1503)
OS X SDK: 10.8 (Base SDK)
Compiler: Default Apple LLVM compiler 4.2

Project file build command:

./premake4 --file=premake/premake4.lua xcode4

Build errors:

/Users/Dev/bgfx/src/bgfx_p.h:98:11: 'unordered_map' file not found
/Users/Dev/bgfx/examples/common/entry/cmd.cpp:15:10: 'unordered_map' file not found

This can be fixed by adding bx/include/compat/osx stuff in bgfx.lua.

After this modification you will start to get compiling errors from renderer_gl.h:

#include< gl/glext.h > <-- this one is missing, proper one is #include <OpenGL/glext.h>
#include< OpenGL/gl.h > <-- won't contain all function declarations are importer in glimport.h

Instead you can find most of the missing stuff from these files:

#include< OpenGL/gl3.h >
#include< OpenGL/gl3ext.h >

But after these modifications you will still get some compiling errors about OpenGL, and I stopped investigating :)

from bgfx.

bkaradzic avatar bkaradzic commented on August 27, 2024

Do you have problems if you build from command line?

$ cd bgfx
$ make
$ make osx-release64

First make will generate makefiles, 2nd will build for OSX 64-bit release.

I don't use XCode and I'm not sure if Premake4 has full support for XCode4.

from bgfx.

thehyperevilcorp avatar thehyperevilcorp commented on August 27, 2024

As I mentioned in first post make osx-reslease64 created invalid executables, even though compiling was "fine".

With latest codebase I get following error:

../../../examples/common/entry/entry_sdl.cpp:14:10: fatal error: 'SDL2/SDL.h' file not found
#include < SDL2/SDL.h >
^
1 error generated.

Seems to be that SDL isn't flagged properly or something.

from bgfx.

bkaradzic avatar bkaradzic commented on August 27, 2024

Yeah SDL2 is forced on OSX, since my native OSX implementation for windowing on OSX is missing input.

You can #define ENTRY_CONFIG_USE_SDL to 0 to avoid this (you can do it via compiler option too).
https://github.com/bkaradzic/bgfx/blob/master/examples/common/entry/entry_p.h#L14

This can be fixed by adding bx/include/compat/osx stuff in bgfx.lua.

This compat/osx should be automatically added for all projects from:
https://github.com/bkaradzic/bx/blob/master/premake/toolchain.lua#L473

I don't have no clue why executable would be invalid on OSX. I've tested only on OSX 10.8.4.

example-02-metaballs is good to test, since it doesn't require any external files. Once it's built can you just type:

$ cd bgfx
$ make
$ make osx-release64
$ .build/osx64_gcc/bin/example-02-metaballs.app/Contents/MacOS/example-02-metaballsRelease

from bgfx.

bkaradzic avatar bkaradzic commented on August 27, 2024

Did you have any luck with this?

from bgfx.

cadabra2 avatar cadabra2 commented on August 27, 2024

My guess is he's trying to run them from the Finder, but the built example .app bundles are broken: they contain executables but no Info.plist files, and you need to run them with a particular working directory to pick up the resources, otherwise they just segfault mysteriously.

Ideally, they'd have Info.plist files and they'd copy required resources into the app bundle so they can find them easily at runtime.

from bgfx.

bkaradzic avatar bkaradzic commented on August 27, 2024

@cadabra2 I test only thru command line, so steps above should work. Proper packaging (for all platforms) is on my TODO list. :)

from bgfx.

xgalaxy avatar xgalaxy commented on August 27, 2024

FYI. I'm getting this problem. Double clicking the app I get: "You can't open the application because it may be damaged or incomplete."

Building from command line with:
make osx-release64

Everything appears to compile fine.
The produced *.app files will not double click launch from finder.
However, I cd into the app bundle and manually run the executable it runs fine.
I should also point out the app icons in finder show up with a circle bar sign over them suggesting they won't run.

The *.app produced only includes the executable file. There is no Info.plist which I'm thinking may be the cause here.

Some other things I've noticed after poking a bit.
If I projgen the Xcode OS X project and open it the Info tab contains incorrect information about the project for the application target properties. Such as requiring arm64 and it being an iPhone project. Eliminating those things produces a .app that works.

from bgfx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.