aMule Forum

English => Compilation problems => Topic started by: Radek on January 11, 2006, 01:24:54 PM

Title: 20060111 - [fixed]Win32/MingW - Error when compiling amule-gui.cpp
Post by: Radek on January 11, 2006, 01:24:54 PM
With today's snapshot I got the following error
Code: [Select]
if g++ -DHAVE_CONFIG_H -I. -I. -I..    -I/mingw/lib/wx/include/msw-unicode-release-static-2.7 -I/mingw/include/wx-2.7 -D__WXMSW__ -mthreads  -I./libs -Ilibs -DCLIENT_GUI -DEC_REMOTE -DNOMINMAX -DUSE_EMBEDDED_CRYPTO -W -Wall -Wshadow -Wundef -O2  -MT amulegui-amule-gui.o -MD -MP -MF ".deps/amulegui-amule-gui.Tpo" -c -o amulegui-amule-gui.o `test -f 'amule-gui.cpp' || echo './'`amule-gui.cpp; \
then mv -f ".deps/amulegui-amule-gui.Tpo" ".deps/amulegui-amule-gui.Po"; else rm -f ".deps/amulegui-amule-gui.Tpo"; exit 1; fi
In file included from amule-remote-gui.h:41,
                 from amule.h:329,
                 from amule-gui.cpp:39:
SearchList.h:187: error: ISO C++ forbids declaration of `auto_ptr' with no type
SearchList.h:187: error: expected `;' before '<' token
SearchList.h:190: error: `CMemFilePtr' does not name a type
make[3]: *** [amulegui-amule-gui.o] Error 1

As mentioned in another thread, I recently installed the new release 3.4.5 of gcc for Mingw, which I used today.
Title: CVS 20060112 - Same problems and hotfix
Post by: Radek on January 12, 2006, 11:43:50 AM
Today I had the time to take a look. I made a hotfix in SearchList.h, after which it compiled.
Code: [Select]
$ diff src/SearchList.h src/SearchList.h.ORG
37d36
< #include               // Needed for auto_ptr  # 20060112/Radek

Next, a similar problem in KnownFileList.cpp. And, of course, a similar hotfix.
Code: [Select]
$ diff src/KnownFileList.cpp src/KnownFileList.cpp.ORG
37d36
< #include           // Needed for std_ptr  # 20060112/Radek
After these two small patches, the compilation finished w/o other problems..
Title: Re: 20060111 - [fixed]Win32/MingW - Error when compiling amule-gui.cpp
Post by: Xaignar on January 12, 2006, 01:03:33 PM
Thanks, will be added. Seems that gcc4 implicity includes "memory" via other headers.