Using gcj verion 4 running on red Hat Enterprise Linux ES release 3 I tried to 
create a executable using shared libraries I had previously created. I got the 
following results:

[EMAIL PROTECTED] WMQ]$ gcj --main=mqTester -o mqTester mqTester.java -L. -
lconnector-shared -lmq-shared
mqTester.java:18: error: Can't find default package ΓÇÿcom.ibm.mqΓÇÖ. 
Check the 
CLASSPATH environment variable and the access to the archives
mqTester.java:49: error: Type ΓÇÿMQQueueManagerΓÇÖ not found in the 
declaration 
of the local variable ΓÇÿqMgrΓÇÖ.
                MQQueueManager qMgr = null;
                   ^
mqTester.java:50: error: Type ΓÇÿMQQueueΓÇÖ not found in the 
declaration of the 
local variable ΓÇÿlocal_queueΓÇÖ.
                MQQueue local_queue = null;
                   ^
mqTester.java:144: error: Type ΓÇÿMQMessageΓÇÖ not found in the 
declaration of 
the local variable ΓÇÿhello_worldΓÇÖ.
                        MQMessage hello_world = new MQMessage();
                           ^
mqTester.java:151: error: Type ΓÇÿMQPutMessageOptionsΓÇÖ not found in 
the 
declaration of the local variable ΓÇÿpmoΓÇÖ.
                        MQPutMessageOptions pmo = new MQPutMessageOptions();
                           ^
mqTester.java:186: error: Type ΓÇÿMQExceptionΓÇÖ not found in the 
declaration 
of the local variable ΓÇÿmeΓÇÖ.
                catch (MQException me) {
                          ^
mqTester.java:197: error: Type ΓÇÿMQExceptionΓÇÖ not found in the 
declaration 
of the local variable ΓÇÿmqeΓÇÖ.
                        } catch (MQException mqe ) {
                                    ^
7 errors

The classes MQQueueManager, MQException, MQPutMessageOptions, etc. referenced 
above all reside in the mq-shared shared library, which was built from a jar 
file and resides in the /home/acuser/gcj/WMQ directory.

I am running this from the /home/acuser/gcj/WMQ directory. My classpath is set 
to the folloing: 
[EMAIL PROTECTED] WMQ]$ echo $CLASSPATH
/home/acuser/gcj/WMQ:.

My path is set to the following:
[EMAIL PROTECTED] WMQ]$ echo $PATH
/usr/local/bin:/bin:/usr/bin:/home/acuser/gcj/WMQ:/home/acuser/bin


FYI..the main program compiles and run successfully on the same box if I do the 
folowing from the command line

[EMAIL PROTECTED] WMQ]$java -cp com.ibm.mq.jar:connector.jar: mqTester -QMgr 
AIX.QUEUE.MANAGER -QName AIX.DATA.QUEUE -hostname 192.168.1.36 -channel 
CHANNEL1 -port 1416

-- 
           Summary: Using v4 of gcj I am unable to build an executable from
                    shared libraries
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: libgcj
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: bparker at ilstechnology dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=20266

Reply via email to