New To Mac-Forums?

Welcome to our community! Join the discussion today by registering your FREE account. If you have any problems with the registration process, please contact us!

Get your questions answered by community gurus Advice and insight from world-class Apple enthusiasts Exclusive access to members-only contests, giveaways and deals

Join today!

 
Start a Discussion
 

Mac-Forums Brief

Subscribe to Mac-Forums Brief to receive special offers from Mac-Forums partners and sponsors

Join the conversation RSS
OS X - Development and Darwin Discussion and questions about development for Mac OS X.

Trying to set up dev environment for PHP Extension


Post Reply New Thread Subscribe

 
Thread Tools
sneakyimp

 
Member Since: Jul 26, 2010
Posts: 4
sneakyimp is on a distinguished road

sneakyimp is offline
Hey everyone:

I'm new to these forums so bear with me.

I'm hoping to become the new maintainer for PHP Extension called AMFEXT. I've been in touch with the original maintainer who has recommended a setup using Visual Studio which I am not particularly excited about.

The basic idea is that I want to set up an IDE on my Mac (Eclipse, XCode, or whatever) and develop in a *nix environment. The problem I'm having is that the amfext source code depends very heavily on the PHP source code for a variety of macros and other stuff and it has a variety of scripts (phpize, configure, etc) that auto-generate the Makefile depending on a variety of conditions within your PHP source directories.

I'm not really sure how to 'import' the existing code (and its makefile) into some IDE on my Mac so that it doesn't go rewriting the Makefile or creating all kinds of directory structures or whatever. I just want to see the *one* C source code file in my IDE with all the friendly code highlighting so I can take advantage of all the IDE goodies look function source locators and one-button compilation and stuff. I'm open to using pretty much any IDE that will allow me to do this.

Can anyone suggest how I might go about this? I've been trying to import with Eclipse and XCode and am not having much luck. NOTE this is not a darwin project but a C project.
QUOTE Thanks
malakh

 
Member Since: Oct 03, 2009
Posts: 4
malakh is on a distinguished road

malakh is offline
I prefer Netbeans. I use it extensively for Java development, and I know ti has strong C/C++, Ruby, and PHP support as well. Might give it a shot. Sounds like it couldn't hurt any.
QUOTE Thanks
sneakyimp

 
Member Since: Jul 26, 2010
Posts: 4
sneakyimp is on a distinguished road

sneakyimp is offline
Selection of an IDE is not really the issue here. The issue is how to set up whatever IDE I've chosen. This is difficult because the source code for amfext, written in C, relies on a couple of scripts to auto-generate a Makefile and various other files. These auto-generated makefiles and source files are required to make the extension play nice with the rest of the PHP project which consists of millions of lines of code.

I fiddled around with XCode yesterday and made some progress. I created a new XCode project in the source folder and added amf.h and amf.c to the project. I also added numerous directories to the Header Search Path. This resulted in most of the code errors going away.

However, I'm still getting 'missing symbol: _estrndup'. This should have been found because amf.c includes php.h which includes zend.h which includes zend_alloc.h which contains this:
Code:
ZEND_API char *_estrndup(const char *s, unsigned int length ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC) ZEND_ATTRIBUTE_MALLOC;

Write multiplayer games using Actionscript 3 and PHP 5 using FlashMOG
QUOTE Thanks
sneakyimp

 
Member Since: Jul 26, 2010
Posts: 4
sneakyimp is on a distinguished road

sneakyimp is offline
It did occur to me that this problem might be due to a library issue rather than a header issue, but I'm still not sure how to deal with it.

The amf source, unless compiled directly into the huge PHP project, is designed to create a shared library object, amf.so. I understand that PHP its Extensions make use of the Zend Engine's modified memory allocation routines such as estrndup. What is not clear to me is how amf.so should gain access to these routines. Do I need to add a library path in my XCode project? If so, which of the dozens of settings in the Project Settings dialog would be the one where I add this? Also, which folder would it be? I see that apache loads the php5 module from modules/libphp5.so.

Any help would be much appreciated.

Write multiplayer games using Actionscript 3 and PHP 5 using FlashMOG
QUOTE Thanks

Post Reply New Thread Subscribe


« Mac Environment Variables and Java | Saving webpages to hard drive... »
Thread Tools

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread
Thread Starter
Forum
Replies
Last Post
How to set environment variables? HSN OS X - Apps and Games 5 12-06-2007 10:19 PM
Setting up a Dev Environment Neko_D Web Design and Hosting 5 08-31-2007 05:22 AM
Login/Firefox Extension Problem Brown Study Community Suggestions and Feedback 2 09-26-2006 06:05 PM
Not able to set environment variables using .profile file. Shambhavi OS X - Operating System 3 04-08-2006 04:15 AM
how can i set the path? Bo Eddy OS X - Development and Darwin 1 05-12-2004 10:45 AM

All times are GMT -4. The time now is 11:21 PM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
X

Welcome to Mac-Forums.com

Create your username to jump into the discussion!

New members like you have made this community the ultimate source for your Mac since 2003!


(4 digit year)

Already a member?