Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5999607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T00:34:35+00:00 2026-05-23T00:34:35+00:00

I have a simple question. Coming from a java background and having worked extensively

  • 0

I have a simple question. Coming from a java background and having worked extensively with eclipse, netbeans or any other java IDE, is quite nice to have the possibility to add a main method to a class and execute it within the IDE, with just a click, and see the output.

I was looking for the same possibility within xcode4/objective-c but I couldn’t find a way. From time to time, I like testing small piece of software, without compiling and running the whole project.

As I am still “thinking” in Java, could you suggest the proper way to achieve this with xcode4 from an “objective-c developer point of view” ?

thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T00:34:36+00:00Added an answer on May 23, 2026 at 12:34 am

    There’s not really a lightweight way to do this, but you have two options that I can think of depending on whether you want to keep the harness code you’ve written.

    If you do, then you’d need to make a new target in your project for each class you drive with a harness, and have that target build just the class you are driving and a simple file with just the main code to drive that class.

    If you don’t, then you could make a target with a main, and each time you want to drive a different class, change which files are built, change the code in main, and rebuild.

    This is assuming that you want to avoid both running and compiling the rest of your code. If you don’t mind compiling everything, you could have one test-harness target that builds all of your classes, and either change main on the fly, or use #ifdefs or a runtime argument to decide which helper code to run.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just a quick query really, In my PHP file, I have variables coming from
I have a basic/simple need to create a pipeline transfer process from one SQL
I'm brand new to Android development... coming from iPhone and .Net background. I've seen
I have a simple question regarding how to write an always block in a
I have very simple question but the answer is still not clear. If i
I have a simple question - I need to write a function for my
I have a simple question - basically I want to fetch all ActiveRecords of
I have a simple question for everyone. I am trying to work out how
I have a simple question about passing custom objects via a webservice. I created
Started coming up with a java web app for online user interaction. Decided to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.