List:General Discussion« Previous MessageNext Message »
From:Andy Ford Date:January 13 2005 4:49pm
Subject:Re: compilation errors in c++ wrapper
View as plain text  
Whoops - every c/c++ program must have a main function.
That's what the cryptic message was...


On Wed, 2005-01-12 at 17:35 +0000, Andy Ford wrote:
> Hi everyone.
> I have been putting together a c++ wrapper for the mysql c libraries and
> have stumbled across the following error...
> >g++ -L/usr/local/mysql/lib -I/usr/local/mysql/include -o connection
> connection.cpp -lmysqlclient -lnsl -lsocket -lz -lm
> Undefined                       first referenced
> symbol                             in file
> main                               
> /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crt1.o
> Result::Result[in-charge](st_mysql_res*)/var/tmp//cc13NSwj.o
> ld: fatal: Symbol referencing errors. No output written to connection
> collect2: ld returned 1 exit status
> The error mentions the Constructor Result::Result (for the class Result)
> which I don't have declared.
> Any ideas what it is telling me. It ultimately comes up with an ld
> referencing error pointing
> at /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/3.3.2/crt1.o
> Any other ideas
> Thanks
> Andy
> -- 
> perl -e "print qq^bIG VeRN ! ^^qq^#'#Yv#=<D+ ^"
> This e-mail is private and may be confidential and is for the intended recipient
> only.  If misdirected, please notify us by telephone and confirm that it has been deleted
> from your system and any copies destroyed.  If you are not the intended recipient you are
> strictly prohibited from using, printing, copying, distributing or disseminating this
> e-mail or any information contained in it.  We use reasonable endeavours to virus scan all
> e-mails leaving the Company but no warranty is given that this e-mail and any attachments
> are virus free.  You should undertake your own virus checking.  The right to monitor
> e-mail communications through our network is reserved by us. 
perl -e "print qq^bIG VeRN ! ^^qq^#'#Yv#=<D+ ^"
compilation errors in c++ wrapperAndy Ford12 Jan
  • Re: compilation errors in c++ wrapperAndy Ford13 Jan