Git Product home page Git Product logo

Comments (12)

drhelius avatar drhelius commented on May 14, 2024

Hi and thank you for your feedback.

It seems your environment isn't properly configured and can't find libSDLmain.a

By the way, if you installed Netbeans you can just open and run the project with the IDE instead of running make, but that won't fix your problem though.

Check this link for the installation and configuration of SDL: http://stackoverflow.com/questions/4591076/c-sdl-on-macosx-without-xcode

This may solve your problem.

from gearboy.

Baekalfen avatar Baekalfen commented on May 14, 2024

Thanks for the quick answer!
Although I'm quite new to all this, so when the instruction says "./configure --prefix=/home/user/SDL" should I replace "/home/user/" with my home dir? Because just copy-pasting gives me some errors:

/bin/sh build-scripts/mkinstalldirs /home/user/SDL/bin
mkdir -p -- /home/user/SDL/bin
mkdir: /home/user/SDL/bin: Operation not supported
make: *** [install-bin] Error 1

I tried replacing the directory to my home dir and it installed succesfully. Now what do i do? I still get the same error when trying to compile GearBoy. Should I somehow add the SDL directory to the make process?

from gearboy.

drhelius avatar drhelius commented on May 14, 2024

Yes that guide assumes you have the SDL extracted on your home dir.

Try this: go to library/frameworks/ and rename SDLmain to SDL

Found here: http://uzebox.org/forums/viewtopic.php?f=9&t=532

from gearboy.

Baekalfen avatar Baekalfen commented on May 14, 2024

The directory "~/Library/Frameworks/" doesn't exist, so i tried "/Library/Framework/" instead. The only SDL file is already called "SDL.framework" so i tried to rename it to "SDLmain.framework", but that didn't change anything...

This might be what goes wrong: http://forums.macrumors.com/showthread.php?t=1495793
But changing the line:
LDLIBSOPTIONS=-lSDLmain -lSDL -Wl,-framework,Cocoa
to
LDLIBSOPTIONS=-lSDL -Wl,-framework,SDL,Cocoa
or
LDLIBSOPTIONS=-Wl,-framework,SDL,Cocoa
or
LDLIBSOPTIONS=-Wl,-framework SDL -framework Cocoa
doesn't help either..

If it is any help, the libSDLmain.a is located at "/usr/local/lib/" and "/opt/local/lib/" and if I write "sdl-config --libs" in the terminal (from "~/"), it returns: "-L/usr/local/lib -lSDLmain -lSDL -Wl,-framework,Cocoa"

I'm not sure if i installed SDL wrong... Can you give a little more detail on what you mean by: "Install and configure SDL for development."?

from gearboy.

drhelius avatar drhelius commented on May 14, 2024

I'm sorry but I can't remember the steps I took to install SDL on my Mac.
I remember having similar problems when I first installed it last year. I also remember following the readmes inside the sdk to complete the installation. I probably made some tweak in my environment after that but I can't remember what.
It could be also related to the Qt framework, both libraries try to redefine the 'main' function and Gearboy uses the main function from Qt.

from gearboy.

Baekalfen avatar Baekalfen commented on May 14, 2024

I have tried doing everything from the readme again... I still can't get it to work.
If someone can confirm that the steps work, I would really like to know what I have done wrong.

I will of cause make a post if I solve it myself.

from gearboy.

drhelius avatar drhelius commented on May 14, 2024

If you feel that I have to change something in the makefile or with the Netbeans project just tell me, or send me a pull request.

I'll make my best to integrate you're findings so any other doesn't have to fix this again. If I have a chance I'll try with a clean environment too.

Thanks

from gearboy.

drhelius avatar drhelius commented on May 14, 2024

I started today with a new Mac installation.

I found that SDL 1.2 no longer compiles on Mavericks so I'm updating both Gearboy and Gearsystem to use SDL 2.

SDL 2 compiled without any issues on my Mac and I was able to build Gearboy with the latest version of Netbeans so I'm closing this issue.

Let me know if you have any further issues.

from gearboy.

Baekalfen avatar Baekalfen commented on May 14, 2024

I tried now on a completely new MacBook. NetBeans 7.4, Xcode 5, Qt 4.8.5 and SDL 2.0.1 installed successfully (I think). I still get the same error:

ld: library not found for -lSDL2main
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [dist/Release/CLang-MacOSX/Gearboy] Error 1
make: *** [.build-conf] Error 2

Can you describe exactly how you installed SDL? I just moved the SDL2.framework to /Library/Frameworks

from gearboy.

drhelius avatar drhelius commented on May 14, 2024

Just followed the readme file for Mac and
./configure
make
sudo make install

from gearboy.

Baekalfen avatar Baekalfen commented on May 14, 2024

Now it works! Fantastic! :)

I downloaded the SDL 2 ->source code<- and compiled it as you described. Maybe that should be more clear in the README-file if that is what you meant to do in the first place?

from gearboy.

drhelius avatar drhelius commented on May 14, 2024

Yes that's it, now you told me about the framework file I did realize about your error.
With Netbeans you need the environment as if you were compiling from the command line, I'll make that clear in the README.
Anyway, making a project for Xcode should be the proper way of fixing this, so anyone using a Mac can just open the project and compile just like the iOS port.
Thank you and have fun.

from gearboy.

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.