Sign in to follow this  
cubicwang

MacOSX newbe need help!

Recommended Posts

cubicwang    122
I was deveplop a graphic project on maxosx with xcode2.1 and carbon No I meet some problem and hope somebody can help me! 1. My program have a lot of warning when I compile the project. How can I disable some of it in my header file like the VC++ doing? The VC++ can use the #pragma(disable ..) How can the GCC doing this? Can all the warnging of GCC be disabled or just some of it can be. I think the VC++ can disable all the warning if you don't want to show it. How can I do this in GCC. 2. My project have some targets in it. One is a application and the other is the dylib.When I runing the program in the XCODE debug tools it will be OK, but if I want to run it by just double click the .app, it can not run.I think that because the dylib have not been linked without the debug tool.But I don't known what to do. 3. how can I get and set the window size in macosx carbon?

Share this post


Link to post
Share on other sites
choffstein    1090
1) First.
Second, right click on your project. Click "get info." Then, go to the "Build" tab. Scroll down until you see the area called "Other Warning Flags." Edit that setting with a flag you want to use. Use this page for reference.

2) Build in release mode?

3) I assume you mean when you create a carbon window, how do you get and set the size (drag and hold)? This thread looks particularly useful. Maybe if you are a bit more specific, I can help you more.

Share this post


Link to post
Share on other sites
szymczyk    182
Quote:
Original post by cubicwang
2. My project have some targets in it. One is a application and the other is the dylib.When I runing the program in the XCODE debug tools it will be OK, but if I want to run it by just double click the .app, it can not run.I think that because the dylib have not been linked without the debug tool.But I don't known what to do.

3. how can I get and set the window size in macosx carbon?


To answer #2, you most likely have ZeroLink turned on. I provide more detailed information about this at the following URL:

http://www.meandmark.com/xcodetips.html

To answer #3, call the function GetWindowPortBounds() to get the window size. Call the function SizeWindow() to set the window size.

Share this post


Link to post
Share on other sites
cubicwang    122
Thank you so much for give me the help.

For question 1: Is there a method for diable the warning in the cpp file?

For that question 2: I just double click the debug build .app and I find it can not run with out the debug tools, I am sure i close the zerolink in the project set and I have not build a release vision now.

Share this post


Link to post
Share on other sites
Ravuya    135
When you run the .app and it quits right away, oftentimes it puts an error message in the Console: check /Applications/Utilities/Console.app to see if it has an error message telling you what's wrong.

Share this post


Link to post
Share on other sites
szymczyk    182
Quote:
Original post by cubicwang
For question 1: Is there a method for diable the warning in the cpp file?

For that question 2: I just double click the debug build .app and I find it can not run with out the debug tools, I am sure i close the zerolink in the project set and I have not build a release vision now.

To answer question 1, Xcode has a setting called Inhibit All Warnings. This setting is in the Warnings build settings collection.

For question 2, if you turned off ZeroLink, clean all the targets and rebuild the project. That will ensure the project is fully linked.

Share this post


Link to post
Share on other sites
Sign in to follow this