linker error-undefined reference to

Hi

i'm getting this error on linking ie on executing the commandgcj --main=apps -o apps apps.o

apps is the name of the file.....the code is compliling without error...

Can anyone tell why this, 'undefined reference to......' error coming and how to correct it

Here is the complete error msg...plz help

[root@localhost ~]# gcj --main=apps -o apps apps.o

apps.o: In function `javax::mail::PasswordAuthentication* SendMailUsingAuthentication$SMTPAuthenticator::getPasswordAuthentication()':

apps.java:(.text+0x48cc): undefined reference to `javax::mail::PasswordAuthentication::class$'

apps.java:(.text+0x48e9): undefined reference to `javax::mail::PasswordAuthentication::PasswordAuthentication(java::lang::String*, java::lang::String*)'

apps.o: In function `SendMailUsingAuthentication$SMTPAuthenticator::SendMailUsingAuthentication$SMTPAuthenticator(SendMailUsingAuthentication*)':

apps.java:(.text+0x490c): undefined reference to `javax::mail::Authenticator::Authenticator()'

apps.o: In function `void SendMailUsingAuthentication::run()':

apps.java:(.text+0x4ca5): undefined reference to `javax::mail::Session* javax::mail::Session::getDefaultInstance(java::util::Properties*, javax::mail::Authenticator*)'

apps.java:(.text+0x4cd6): undefined reference to `void javax::mail::Session::setDebug(bool)'

apps.java:(.text+0x4cdd): undefined reference to `javax::mail::internet::MimeMessage::class$'

apps.java:(.text+0x4cfd): undefined reference to `javax::mail::internet::MimeMessage::MimeMessage(javax::mail::Session*)'

apps.java:(.text+0x4d0d): undefined reference to `javax::mail::internet::InternetAddress::class$'

apps.java:(.text+0x4d3c): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'

apps.java:(.text+0x4da1): undefined reference to `javax::mail::internet::InternetAddress::class$'

apps.java:(.text+0x4de4): undefined reference to `javax::mail::internet::InternetAddress::class$'

apps.java:(.text+0x4e13): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'

apps.java:(.text+0x4e82): undefined reference to `javax::mail::internet::InternetAddress::class$'

apps.java:(.text+0x4ea5): undefined reference to `javax::mail::internet::InternetAddress::InternetAddress(java::lang::String*)'

apps.java:(.text+0x4ee7): undefined reference to `javax::mail::Message$RecipientType::class$'

apps.java:(.text+0x4ef1): undefined reference to `javax::mail::Message$RecipientType::TO'

apps.java:(.text+0x4fb1): undefined reference to `void javax::mail::Transport::send(javax::mail::Message*)'

apps.o:(.data+0x3168): undefined reference to `javax::mail::PasswordAuthentication* javax::mail::Authenticator::requestPasswordAuthentication(java::net::InetAddress*, int, java::lang::String*, java::lang::String*, java::lang::String*)'

apps.o:(.data+0x316c): undefined reference to `java::net::InetAddress* javax::mail::Authenticator::getRequestingSite()'

apps.o:(.data+0x3170): undefined reference to `int javax::mail::Authenticator::getRequestingPort()'

apps.o:(.data+0x3174): undefined reference to `java::lang::String* javax::mail::Authenticator::getRequestingProtocol()'

apps.o:(.data+0x3178): undefined reference to `java::lang::String* javax::mail::Authenticator::getRequestingPrompt()'

apps.o:(.data+0x317c): undefined reference to `java::lang::String* javax::mail::Authenticator::getDefaultUserName()'

apps.o:(.data+0x31f0): undefined reference to `javax::mail::Authenticator::class$'

collect2: ld returned 1 exit status

[3764 byte] By [vineet_mita] at [2007-11-27 4:45:06]
# 1
Double-post
maple_shafta at 2007-7-12 9:57:19 > top of Java-index,Desktop,Deploying...