comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: gcc and idl
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: gcc and idl [message #7377 is a reply to message #7373] Thu, 07 November 1996 00:00 Go to previous messageGo to previous message
jbob is currently offline  jbob
Messages: 4
Registered: November 1996
Junior Member
In article <327FFE1A.446B9B3D@gojira.berkeley.edu> Karl Young <karl@gojira.berkeley.edu> writes:

> I am trying to call a C++ routine that I want to compile with
> gcc on a Sparc running SunOS 4.1.3 and call from IDL with
> CALL_EXTERNAL. The flags used for the compile and link calls given in
> the IDL manual examples for the SunOS cc compiler are very different
> from the ones I need to use with gcc so I'm apparently not building the
> right kind of shared object file (i.e. I'm getting messages like:
> ld.so: Undefined symbol: ___11spin_systemi)
>
> Has anyone done this sucessfully (i.e. used IDL with gcc) and if
> so any suggestions, e.g. what flags to use for the compile and
> link steps ? Thanks for any tips,

I had a similar problem with a slightly more difficult example -- using
a C++ routine with CALL_EXTERNAL from IDL where the C++ routine was a
wrapper for a FORTRAN routine. I found that I could only get it to work
by using the Sun linker.

The following Makefile section worked successfully on SunOS 4.1.2 with
its bundled "ld", gcc 2.6.3 and Sun SPARCompiler Fortran 2.0.1:

### NOTE: No "LD" define -- the default Sun linker is "/bin/ld".
CXX = g++
CXXFLAGS = -fpic
FFLAGS = -pic
LDFLAGS = -L/usr/lang/SC2.0.1
LDLIBS = -lF77 -lM77 -lpfc -lm

xxx.so: xxx.o ....
$(LD) -o xxx xxx.o ....


-----------------------------------------------------
J. Bob Brown jbob@snap.med.ge.com
Consulting for GE Medical Systems
For ID only -- standard disclaimers apply.

"Of course that's just my opinion. I could be wrong."
-Dennis Miller
-----------------------------------------------------
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Viewing unsigned int images (was: 16 bit / 8 bit depth colors on the mac)
Next Topic: Is there a replacement for STEPWISE in 4.0x?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:42:12 PDT 2025

Total time taken to generate the page: 0.00458 seconds