# complier differences



## tim_mcd (Feb 14, 2003)

does anyone know which librarys are linked when compiling using 'c++' as opposed to 'cc'. My project works with one but not the other, argh.

cheers 

timmcd


----------



## lurk (Feb 14, 2003)

Are you sure that it is a libraries issue?  Those are compilers for different "languages"...

Apart from that *otool* is what you want here are some examples


```
[Omppu:~] eric% otool -L /sw/bin/xemacs
/sw/bin/xemacs:
        /usr/X11R6/lib/libXaw.7.dylib (compatibility version 7.0.0, current version 7.0.0)
        /sw/lib/libtiff.3.dylib (compatibility version 3.5.0, current version 3.5.7)
        /sw/lib/libpng.2.dylib (compatibility version 1.0.12, current version 1.0.12)
        /sw/lib/libjpeg.62.dylib (compatibility version 63.0.0, current version 63.0.0)
        /usr/lib/libz.1.1.3.dylib (compatibility version 1.0.0, current version 1.1.3)
        /usr/X11R6/lib/libXpm.4.dylib (compatibility version 4.11.0, current version 4.11.0)
        /usr/X11R6/lib/libXmu.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /usr/X11R6/lib/libXt.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libXext.6.dylib (compatibility version 6.4.0, current version 6.4.0)
        /usr/X11R6/lib/libX11.6.dylib (compatibility version 6.2.0, current version 6.2.0)
        /usr/X11R6/lib/libSM.6.dylib (compatibility version 6.0.0, current version 6.0.0)
        /usr/X11R6/lib/libICE.6.dylib (compatibility version 6.3.0, current version 6.3.0)
        /sw/lib/libdl.0.dylib (compatibility version 0.0.0, current version 0.0.0)
        /sw/lib/libncurses.dylib.5 (compatibility version 5.0.0, current version 5.2.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 55.1.0)
[Omppu:~] eric% otool -L /Applications/TextEdit.app/Contents/MacOS/TextEdit 
/Applications/TextEdit.app/Contents/MacOS/TextEdit:
        /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 8.0.0)
        /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 60.0.0)
[Omppu:~] eric%
```

Hope that comes out OK.

Have Fun!
-Eric


----------



## tim_mcd (Feb 15, 2003)

otool did the job, c++ links to the system library (see below), simply including it within my project made it all ok.

/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 55.1.0)


----------



## tim_mcd (Feb 15, 2003)

forgot to say thanks before hitting reply.

cheers timmcd


----------

