Comments (12)
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.
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.
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.
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.
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.
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.
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.
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.
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.
Just followed the readme file for Mac and
./configure
make
sudo make install
from gearboy.
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.
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)
- LEGO Racers (USA) (En,Fr,Es) stuck on the very first screen
- Foreman for Real (USA, Europe) corrupt music
- Zerd no Densetsu (Japan) crashes out on the very first screen
- Barbie - Pet Rescue (USA) black screen
- Debugger setting breakpoints HOT 4
- Correctly implement INT 48h HOT 3
- Regarding the screen ghosting value HOT 2
- Android platform HOT 1
- Ability to link Emulator instances [Feature Request (if not implemented)] HOT 1
- The smurfs gameboy doesn't start HOT 2
- Road Rash hangs
- Unsupported games
- [Feature Request] Motion Controls support HOT 1
- Implement build for Apple Silicon
- Does it support multiplayer? HOT 2
- [macOS] version numbers broken in the latest release HOT 1
- New to Debian. Just downloaded GearColeco but need help with controller HOT 1
- Shitwave rom not working HOT 1
- Architecture detection in About window HOT 1
- Feature Request: Custom screenshot directory
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gearboy.