• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1)


  • Subject: Re: Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1)
  • From: Dieter Oberkofler <email@hidden>
  • Date: Sun, 9 Oct 2005 17:25:42 +0200

Dear Andreas!

Thank you for your advise. Please see my remarks below...

The key questions seem to be:
1. Can I build a C++ project in XCode 2.1 using gcc 3.3 and link it together with libraries that have been build with XCode ?
2. Is there an explanation, whz an application that build fine under XCode 1.5 and runs without any error message under OSX 10.3 would generate EXC_BAD_ACCESS style errors when run from OSX 10.4 AND the same application build on XCode 2.1 with gcc 3.3 runs from OSX 10.3 but generates the above errors when run from OSX 10.4?


Thank you for your help

-Dieter

On Oct 9, 2005, at 11:32 AM, Andreas Grosam wrote:


On 08.10.2005, at 17:18, Dieter Oberkofler wrote:


Hopefully someone can help!

1) XCode/OSX compatibility:
As far as I have understood OSX 10.4 runs only XCode 2.0 or later and XCode 2.0 cannot be installed on OSX 10.3 and on the other side XCode 1.5 cannot be installed on OSX 10.4. This seems so restricted and complicating that I hope to have missed something or it this really the case? How are people dealing with this restriction, if they want to develop for all (let's say starting with OSX 10.2) OSX versions?


You can use Xcode 2.0 on Mac OS 10.4 to compile applications running for Mac OS 10.2. But you should better upgrade to Xcode 2.1.
Please read:
<http://developer.apple.com/documentation/DeveloperTools/Conceptual/ cross_development/index.html>
I am currently trying to use XCode 2.1 and am happy to hear and read that the generated code should be backwards compatible to 10.2.



2) Problems when using XCode 2.1 on OSX 10.4:
I have a large C++ application that runs fine on OSX 10.3 but reports strange memory errors on 10.4!
The application is depending on several frameworks that have been released for XCode 1.5 and has therefore been build in XCode 1.5 under OSX 10.3.


When compiling with gcc-4, ensure **everything** which will be linked to this binary has been compiled with gcc-4, too. Otherwise, you should get linker errors.
As mentioned, read the "Cross development" section.
As recommended by my library vendor, I have been using XCode 2.1 with the gcc version 3.3 using gcc_select 3.3. I have not even been trying to build with gcc 4 because I would have expected even more problems with the old libraries I am using.


The same application has now been rebuild under XCode 2.1 using gcc 3.3 because the native gcc 4.1 would simply not run and seems to compile and link just fine.

as mentioned ...
Furthermore, gcc-4 is more srtict regarding the C++ langauge than its predecessor, gcc-3. Just try to fix compiler errors and warnings.
Would you really recommend using gcc 4 in my setup

Only when now running the application very strange memory allocation errors occur. When running in the debugger environment the debugger reports a EXC_BAD_ACCESS error message shortly after starting the app and when running without debugger the applications reports errors like "LJSApplication(628) malloc: *** Deallocation of a pointer not malloced: 0xb06fe20;".

You - or some code in your third-party libs - tried to deallocate a pointer which is not a valid pointer to an allocated memory block.
This might also happend when trying to deallocate a valid pointer twice. This is a programmer error.
This problem happens somewhere in the libraries long before even reaching my own code and cannot be debugged. I for sure always except this to be a programming error in in this case there are a few reasons to look for alternatives like library incompatibilities. The same executable runs like a charm when executed from OSX 10.3 and does not show any memory errors when running in the debugger.

I have been trying to track down this problem to the root by debugging and tracing for quite a while but cannot find any error in the app itself even when reducing it to a simple example app.

Be sure, there is one. Don't give up - try to find it. You already know the address of the pointer - try to break when this pointer with this value will be freed. Check the source around it. Will the pointer set to zero? Will it be called twice?
I cannot debug the code where the error occurs.


I have also found out, that also when running the application that has been build with XCode 1.5 on OSX 10.3 from an OSX 10.4 system, the application that runs just fine on OSX 10.3 reports the same memory allocation errors on OSX 10.4.

Means, your product built with gcc-3.3 on 10.3 fails to run on 10.4 but runs without problems on 10.3?
Is the error caused from within a system library/framework you don't have sources for?
Absolutely yes! This is why I would like to better understand, if it might be a problem related to the libraries.


And now comes the best: Also running the application build with XCode 2.1 under OSX 10.4 runs like a charm when being started from an OSX 10.3 system.

Built with gcc-4?
No build with gcc 3.3!

I'm totally lost! Is this all because I would need a new set of new libraries/frameworks etc. from all my 3rd party suppliers? Is something wrong with the way how those 3rd party libraries are build?

If you compile your sources with gcc-4 and linking to frameworks/ libraries - you need these compiled with gcc-4.
Everything is now build with gcc 3.3!




Hope this helps

Andreas


Thank you in advance

-Dieter


_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40onlinehome.de


This email sent to email@hidden






_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1)
      • From: Markus Hitter <email@hidden>
References: 
 >Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1) (From: Dieter Oberkofler <email@hidden>)

  • Prev by Date: Re: [SOLVED] C++ in a Cocoa App - How Hard is THAT?
  • Next by Date: autocomplete stops working with typedefs in C++ (XCode 2.1)
  • Previous by thread: Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1)
  • Next by thread: Re: Moving from OSX 10.3 (XCode 1.5) to OSX 10.4 (XCode 2.1)
  • Index(es):
    • Date
    • Thread