From: M.Kranthi K. <kr...@ii...> - 2006-07-09 14:11:10
|
On Sat, 8 Jul 2006, Mark Bourne wrote: > Should the main function not be declaredint main()orint main(int argc, ch= ar* argv[])? > Just thinking different versions might behave differently where the retur= n type isn't specified. > Mark. I tried all the variations, but no difference in the output what so ever. > > M.Kranthi Kumar wrote: >> Hi Joao,> I am writing in C. The program is:>> #include <stdio.h>>> main= ()> {> printf("Hello!\n");> }>> An installation with the same files is work= ing on a friend's comp.(I > simply copied my C:\mingw to his comp.) It's wo= rking fine in his > comp., but in mine, it still gives an error. The only o= bvious > difference that I could make out between his WinXP installation an= d > mine was that he had Service Pack 2 installed. I guess that's not the >= real reason though.>> Thanks,> kranthi.>> On Sat, 8 Jul 2006, [iso-8859-1]= Jo=EF=BF=BDo Esteves wrote:>>> Are you writing in C or C++? In windows, yo= u should use .cpp as an >> extension>> for your file, instead of .c, if you= are programming in C++.>>>> Joao>> ----- Original Message ----->> From: "M= =2EKranthi Kumar" <kr...@ii...>>> To: <min...@li...urcefo= rge.net>>> Sent: Friday, July 07, 2006 6:46 PM>> Subject: [Mingw-users] Lin= king problem for a newbie>>>>>>> Hi all,>>> I have recently installed MinGW= =2E I have unzipped mingw-runtime,>>> w32api, binutils, gcc-core binary pac= kages into C:/mingw. I wrote a>>> hello.c which prints "Hello!". I tried to= do `mingw32-gcc hello.c` >>> and got>>> the following output:>>>>>> Info: = resolving __fmode by linking to __imp___fmode (auto-import)>>> Info: resolv= ing __fpreset by linking to __imp___fpreset (auto-import)>>> C:/mingw/bin/.= =2E/lib/gcc/mingw32/3.4.2/../../../crt2.o(.text+0x20e):crt1.c: >>>>>> undef= ined reference to `_pei386_runtime_relocator'>>> fu000001.o(.idata$3+0xc): = undefined reference to `libmsvcrt_a_iname'>>> fu000002.o(.idata$3+0xc): und= efined reference to `libmsvcrt_a_iname'>>> fu000004.o(.idata$3+0xc): undefi= ned reference to `libmsvcrt_a_iname'>>> fu000005.o(.idata$3+0xc): undefined= reference to `libmsvcrt_a_iname'>>> nmth000000.o(.idata$4+0x0): undefined = reference to `_nm___fmode'>>> nmth000003.o(.idata$4+0x0): undefined referen= ce to `_nm___fpreset'>>> collect2: ld returned 1 exit status>>>>>> Does any= one know how to fix these errors, and what's causing them?>>>>>> Thanks in = advance,>>> kranthi.>>>>>> Using Tomcat but need to do more? Need to suppor= t web services, >>> security?>>> Get stuff done quickly with pre-integrated= technology to make your job>>> easier>>> Download IBM WebSphere Applicatio= n Server v.1.0.1 based on Apache >>> Geronimo>>> http://sel.as-us.falkag.ne= t/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642 >>>>>> _____________= __________________________________>>> MinGW-users mailing list>>> MinGW-use= rs...@li...>>>>>> You may change your MinGW Account Options or= unsubscribe at:>>> https://lists.sourceforge.net/lists/listinfo/mingw-user= s>>>>>>>>> Using Tomcat but need to do more? Need to support web services, = >> security?>> Get stuff done quickly with pre-integrated technology to mak= e your >> job easier>> Download IBM WebSphere Application Server v.1.0.1 ba= sed on Apache >> Geronimo>> http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid= =3D120709&bid=3D263057&dat=3D121642>> _____________________________________= __________>> MinGW-users mailing list>> Min...@li...>>= >> You may change your MinGW Account Options or unsubscribe at:>> https://l= ists.sourceforge.net/lists/listinfo/mingw-users>>>>>-----------------------= ------------------------------------------------->>Using Tomcat but need to= do more? Need to support web services, security?>Get stuff done quickly wi= th pre-integrated technology to make your job easier>Download IBM WebSphere= Application Server v.1.0.1 based on Apache Geronimo>http://sel.as-us.falka= g.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D121642> >>------------= ------------------------------------------------------------>>_____________= __________________________________>MinGW-users mailing list>MinGW-users@lis= ts.sourceforge.net>>You may change your MinGW Account Options or unsubscrib= e at:>https://lists.sourceforge.net/lists/listinfo/mingw-users> > > Using Tomcat but need to do more? Need to support web services, security?= Get stuff done quickly with pre-integrated technology to make your job easi= erDownload IBM WebSphere Application Server v.1.0.1 based on Apache Geronim= ohttp://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid=3D120709&bid=3D263057&dat=3D= 121642_______________________________________________MinGW-users mailing li= stM...@li... > You may change your MinGW Account Options or unsubscribe at:https://lists= =2Esourceforge.net/lists/listinfo/mingw-users > |