Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / January 2004



Tip: Looking for answers? Try searching our database.

CarbonLib not found?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Vincent Predoehl - 06 Jan 2004 07:15 GMT
Hi, I am trying to port my PowerPlant application to Carbon.  I just got it
to compile in CW9.1, and it still builds as a Classic Application.  When I
try to run it now, I get a message in a notification window that says

The application "myapp PPC" could not be opened because >>CarbonLib<< could
not be found.

I have CarbonLib installed in my System Folder:Extensions in the classic
environment.  I don't understand why I am getting this.

Signature

Vincent

MW Ron - 06 Jan 2004 15:02 GMT
>Hi, I am trying to port my PowerPlant application to Carbon.  I just got it
>to compile in CW9.1, and it still builds as a Classic Application.  When I
>try to run it now, I get a message in a notification window that says

I assume that you are trying to run it outside of the IDE,  you probably
can't run it from within the IDE since it is classic.  (we do provide an
debugger version of the 8.3 IDE for this use)

>The application "myapp PPC" could not be opened because >>CarbonLib<< could
>not be found.

try increasing the heap (partition size) for your application.  The
error with the arrows like that means it is there but for some reason it
can't load.

>I have CarbonLib installed in my System Folder:Extensions in the classic
>environment.  I don't understand why I am getting this.

If it isn't the partition some more information would help.

Ron

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

Vincent Predoehl - 07 Jan 2004 00:05 GMT
Thanks.  I figured out what I did though.  It was something stupid not worth
mentioning.

>> Hi, I am trying to port my PowerPlant application to Carbon.  I just got it
>> to compile in CW9.1, and it still builds as a Classic Application.  When I
[quoted text clipped - 17 lines]
>
> Ron

Signature

Vincent

Miro Jurisic - 07 Jan 2004 03:39 GMT
> Thanks.  I figured out what I did though.  It was something stupid not worth
> mentioning.

It's worth mentioning so that others will not make the same mistake...

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

Sean McBride - 07 Jan 2004 18:31 GMT
> > Thanks.  I figured out what I did though.  It was something stupid not worth
> > mentioning.
>
> It's worth mentioning so that others will not make the same mistake...

And all these posts are archived with google, so if you tell us what it
was it may help many people.
Avi Drissman - 06 Jan 2004 16:50 GMT
> The application "myapp PPC" could not be opened because >>CarbonLib<< could
> not be found.

The ">><<" means that the CarbonLib loaded, but that it failed to
initialize. The usual culprit in this situation is that you're still
linked to InterfaceLib as well as being linked to CarbonLib.

If this is the case, you have two choices. Either go for an intermediate
step of linking with both InterfaceLib and CarbonAccessors.o, or go
all-out and link (only!) with CarbonLib, making sure you're not linked to
InterfaceLib, MathLib, ControlsLib, etc.

Avi

Signature

Avi Drissman                                          avi@drissman.com
+--------------------------------------------------------------------+
                      http://avi.drissman.com/
              Argh! My news server is trunca

Vincent Predoehl - 07 Jan 2004 01:10 GMT
> The ">><<" means that the CarbonLib loaded, but that it failed to
> initialize. The usual culprit in this situation is that you're still
[quoted text clipped - 6 lines]
>
> Avi

I did link with CarbonLib, which was my mistake.  Now I am getting these
link errors from MSL:

Link Error   : undefined: 'DisposeTextToUnicodeInfo' (code)
Referenced from '__msl_text2unicode' in MSL_C_PPC.Lib

Link Error   : undefined: 'ConvertFromTextToUnicode' (code)
Referenced from '__msl_text2unicode' in MSL_C_PPC.Lib

Link Error   : undefined: 'CreateTextToUnicodeInfoByEncoding' (code)
Referenced from '__msl_text2unicode' in MSL_C_PPC.Lib

Link Error   : undefined: 'UpgradeScriptInfoToTextEncoding' (code)
Referenced from '__msl_get_system_encoding' in MSL_C_PPC.Lib

I searched Find Library, and I found the the libraries UnicodeConverter and
TextCommon.  When I import these libraries, the application compiles and
runs fine Š when launched from the Finder.  If I try to launch it in
CodeWarrior, the debugger barfs on it and says:

The application "(null)" could not be launched because of a shared library
error:  "2 <myapp><myapp><UnicodeConverter><>"

I am assuming part of the message was truncated.

I apologize if you have been through this before.  I'm just getting back
into CodeWarrior and I really appreciate you guy's help getting back up to
speed.

Signature

Vincent

MW Ron - 07 Jan 2004 03:08 GMT
>I did link with CarbonLib, which was my mistake.  Now I am getting these
>link errors from MSL:
[quoted text clipped - 24 lines]
>into CodeWarrior and I really appreciate you guy's help getting back up to
>speed.

This is a FAQ from CW 7 are yourunning CW 9, it comes from the HFS+ file
support.

I get these link errors

Link Error   : undefined 'DisposeTextToUnicodeInfo' (code)
Link Error   : undefined 'ConvertFromTextToUnicode' (code)
Link Error   : undefined 'CreateTextToUnicodeInfoByEncoding' (code)
Link Error   : undefined 'UpgradeScriptInfoToTextEncoding' (code)

You may need to weak import the stub files for the libraries
UnicodeConverter, UTCUtils and TextCommon.  The HFS+ file support in MSL
C need these.
The weak import settings are in the object inspector for that file.

If you turn off the HFS+ flag and recompile the MSL library, you'll get
the old behavior without having to link in the additional libraries.

Signature

Metrowerks, maker of CodeWarrior   -  "Software Starts Here"  
Ron Liechty - MWRon@metrowerks.com - <http://www.metrowerks.com>

Vincent Predoehl - 09 Jan 2004 06:24 GMT
> This is a FAQ from CW 7 are yourunning CW 9, it comes from the HFS+ file
> support.
[quoted text clipped - 13 lines]
> If you turn off the HFS+ flag and recompile the MSL library, you'll get
> the old behavior without having to link in the additional libraries.

Ron, this fixed the problem I was having.  Now I'm having a new, but similar
problem.  When I try to launch in CW Debugger, I get an alert box that says
"The application (null) could not be launched because of a shared library
error.  "<<myapp><myapp><QuickTimeLib><FCompressImage>"

I tried import weak on QuickTimeLib and I get an access fault exception from
an operator new call in LLongComparator::GetComparator().  At least it
didn't lock up CodeWarrior though.

Anyway, I think I'm missing the point on something.  I have a CW6 project
that is not carbonized.  I just want to get it running in CW9, but I'm
running into all of these problems.  Can anybody explain what's going on
here?

Signature

Vincent

Jon Summers - 09 Jan 2004 11:22 GMT
> I tried import weak on QuickTimeLib and I get an access fault exception from
> an operator new call in LLongComparator::GetComparator().  At least it
> didn't lock up CodeWarrior though.

Remove QuickTimeLib and all non carbon MacToolbox libs from your carbonized
project.

> Anyway, I think I'm missing the point on something.  I have a CW6 project
> that is not carbonized.  I just want to get it running in CW9, but I'm
> running into all of these problems.  Can anybody explain what's going on
> here?

CarbonLib is not just another Lib added to a project to make it Carbonized;
it replaces ALL the MacToolbox stub libraries.

The number of libs in your carbon project will be very small:
   MSL_Runtime_PPC.lib
   MSL_C_Carbon.Lib
   MSL_C++_PPC.Lib
   CarbonLib
   CarbonFrameworkLib

(You can now turn on Link warnings again)

Signature

   jons(AT)vrtools(DOT)com

Vincent Predoehl - 09 Jan 2004 18:04 GMT
> Remove QuickTimeLib and all non carbon MacToolbox libs from your carbonized
> project.

Except that my project isn't carbonized yet.  I just wanted to get it
running in CW9 first.  Maybe I have to carbonize it, if that's what
PowerPlant is expecting.

>> Anyway, I think I'm missing the point on something.  I have a CW6 project
>> that is not carbonized.  I just want to get it running in CW9, but I'm
[quoted text clipped - 12 lines]
>
> (You can now turn on Link warnings again)

Signature

Vincent

Micah Koch - 09 Jan 2004 23:10 GMT
> > Remove QuickTimeLib and all non carbon MacToolbox libs from your carbonized
> > project.
>
> Except that my project isn't carbonized yet.  I just wanted to get it
> running in CW9 first.  Maybe I have to carbonize it, if that's what
> PowerPlant is expecting.

You can't debug a Classic App from the CW 9 IDE.  If you create a
non-debug build and run it does it work?
MW shipped a version of the CW 8.3 IDE to enable you to debug a Classic
App.  What you have to do is copy over the CW 8.3 IDE from the CD(google
for the location, I know MWRon has mentioned it before), then set it to
startup in classic mode(do a get info).  Then you should be able to use
that IDE to debug your Classic project.
Micah
Vincent Predoehl - 09 Jan 2004 23:19 GMT
> You can't debug a Classic App from the CW 9 IDE.  If you create a
> non-debug build and run it does it work?

Yes.

> MW shipped a version of the CW 8.3 IDE to enable you to debug a Classic
> App.  What you have to do is copy over the CW 8.3 IDE from the CD(google
> for the location, I know MWRon has mentioned it before), then set it to
> startup in classic mode(do a get info).  Then you should be able to use
> that IDE to debug your Classic project.
> Micah

Thanks for the heads up.  I haven't been doing any Mac programming, so I
didn't catch MW Ron's previous post.  Anyway, I guess it's time to move on
from this issue because it won't work.  Thanks!!

Signature

Vincent

Micah Koch - 10 Jan 2004 01:03 GMT

> > MW shipped a version of the CW 8.3 IDE to enable you to debug a Classic
> > App.  What you have to do is copy over the CW 8.3 IDE from the CD(google
[quoted text clipped - 6 lines]
> didn't catch MW Ron's previous post.  Anyway, I guess it's time to move on
> from this issue because it won't work.  Thanks!!

I might have not clearly stated what I was trying to tell you.  The CW
8.3 IDE comes with CW 9 so you can debug a classic app under OS X.  You
just have to sure the older IDE when you want to do that.  It should be
on your CW 9 CD.  So it will work, you just have to get it all setup
properly.  Hope this helps,
Micah
Vincent Predoehl - 10 Jan 2004 02:46 GMT
> I might have not clearly stated what I was trying to tell you.  The CW
> 8.3 IDE comes with CW 9 so you can debug a classic app under OS X.  You
> just have to sure the older IDE when you want to do that.  It should be
> on your CW 9 CD.  So it will work, you just have to get it all setup
> properly.  Hope this helps,
> Micah

Thanks for the info.  I don't think I'll bother with it right now.  I'm more
interested in porting it to Carbon.  I have 170 unsupported functions to
remove, so I have plenty to do.

Signature

Vincent

Miro Jurisic - 06 Jan 2004 23:46 GMT
> The application "myapp PPC" could not be opened because >>CarbonLib<< could
> not be found.

There are three common reasons that this happens:

1. You linked with a library that was linked with InterfaceLib

You need to link with the carbonized version of that library

2. Your application heap is too small

Increase the heap in target settings

3. Your application flags are incorrect

Fix them, the correct flags can be found by looking up older answers to this
same question on groups.google.com

hth

meeroh

Signature

If this message helped you, consider buying an item
from my wish list: <http://web.meeroh.org/wishlist>

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.