This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Support Pleace!!


Myabe you should drop the ".h" from your includes.

On 2004-07-20 09:02:17 +0800 Ruben Guerrero <arcamax2@yahoo.com> wrote:

> Hellow to everyone.
> 
> In the latest version of gcc (GCC 2.96) the following
> Makefile working well to my.
> 
> #	set CLIB and CLASSDIR to the current directory (.)
> #	set EXTRA_LIBS if necessary (or just comment it out
> if not relevant)
> #	uncomment LIB_CODE, and LIB as is appropriate
> #
> #       Except for MS-DOS you shouldn't have to edit
> below the "=========" line
> #
> #       MS-DOS note:
> #	Under MS-DOS all the .o extensions need to be
> globally changed to .obj,
> #       to make this easier there is a token 'O'.
> #	The -o filename  option in the compile statements
> need to be removed.
> #
> #
> HOME=.
> LIB_DIR = $(HOME)/lib
> # Set to MIPS, SGI, SUN4, MSDOS, etc.
> MACHINE = LINUX
> #
> #
> # Turn this ON if you trust the compilers built in
> random number generator
> #TRUST_RAND = -DTRUST_RAND
> #
> #
> #
> #
> #CLIB = $(HOME)/clib
> #CLASSDIR = $(HOME)/classlib
> CLIB = .
> CLASSDIR = .
> #
> #
> # Unix AT&T
> #CC = cc
> #CFLAGS = -O -I$(HOME) -I/usr/include/bsd
> #CPP = CC
> #CPFLAGS = -D$(MACHINE) $(CFLAGS)
> #BSD = -lbsd
> #EXTRA_LIBS = $(BSD) -lm
> #
> #
> # Unix GNU C++
> CC = gcc
> CFLAGS = -O -I$(HOME)
> CPP = g++
> CPFLAGS = -D$(MACHINE) $(CFLAGS)
> #BSD = -lbsd
> EXTRA_LIBS = $(BSD) -lm
> #
> #
> # MSDOS Symantec C++ V6.1
> #CC = sc
> #CFLAGS = -o -ml -f -I$(HOME)
> #CPP = sc
> #CPFLAGS = -D$(MACHINE) $(CFLAGS)
> #LIB = lib
> #
> #
> # MSDOS Borland C++ V4.0
> #CC = bcc
> #CFLAGS = -O -ml -f -I$(HOME)
> #CPP = bcc
> #CPFLAGS = -D$(MACHINE) $(CFLAGS)
> #LIB = +tlib
> #
> #
> #
> # uncomment the appropriate set:
> #
> # Unix
> O = o
> REGISTRAR = registrar
> SDELIB = sdeint
> LIB_NAME = lib$(SDELIB).a
> LIB_DIR = .
> LIBS     = -L$(LIB_DIR) -l$(SDELIB)
> LIB = ar rcu
> LIB_COMMAND = $(LIB_CODE)
> # set to "echo" if the real ranlib is not needed
> RANLIB = ranlib
> #
> #
> # MSDOS
> #O = obj
> #REGISTRAR = registra
> #LIB_FLAGS = /c
> #SDELIB = sdeint.lib
> #LIB_NAME = $(SDELIB)
> #LIBS = $(SDELIB)
> #LIB_COMMAND = @sdelib.rsp
> #RANLIB = echo
> #
> #
> # Turn these ON if you are using the CPU Timer
> USE_TIMER = -DUSE_CPUTIMER
> CPUTIMER = cputime.$(O)
> #
> #
> LIB_CODE = standio.$(O) $(CPUTIMER) signat.$(O)
> comment.$(O) timestamp.$(O) \
> 	    vector.$(O) barray.$(O) random.$(O) r250.$(O)
> barray2d.$(O) \
> 	    matrix.$(O) error.$(O) randsmpl.$(O) sdeint.$(O)
> dynamics.$(O) \
> 	    $(REGISTRAR).$(O) randgen.$(O) rndlcg.$(O)
> erstream.$(O)
> #
> #
> #
> ARGFILES = getargs.$(O) stoi.$(O)
> PARMFILES = getparam.$(O)
> #
> #
> #
> #
> ===========================================================================
> #
> default: $(LIB_NAME) ito sdedemo sdedemo2 shmsde
> 
> 
> #
> #
> #
> ito: ito.cpp $(ARGFILES) $(LIB_NAME)
> 	$(CPP) $(CPFLAGS) $(USE_TIMER) ito.cpp $(ARGFILES) -o
> ito $(LIBS) $(EXTRA_LIBS)
> 
> sdedemo: sdedemo.cpp $(ARGFILES) $(LIB_NAME)
> 	$(CPP) $(CPFLAGS) sdedemo.cpp $(ARGFILES) -o sdedemo
> $(LIBS) $(EXTRA_LIBS)
> 
> sdedemo2: sdedemo2.cpp $(ARGFILES) $(LIB_NAME)
> 	$(CPP) $(CPFLAGS) sdedemo2.cpp $(ARGFILES) -o
> sdedemo2 $(LIBS) $(EXTRA_LIBS)
> 
> shmsde: sdengine.cpp shmsde.hpp $(ARGFILES)
> $(PARMFILES) $(LIB_NAME)
> 	cp shmsde.hpp physics.hpp
> 	$(CPP) $(CPFLAGS) sdengine.cpp $(ARGFILES)
> $(PARMFILES) -o shmsde $(LIBS) $(EXTRA_LIBS)
> 
> #
> #
> #
> #
> #
> # Misc object modules that need more than generic info
> #
> 
> dynamics.$(O): dynamics.cpp dynamics.hpp
> $(CLASSDIR)/vector.hpp $(CLASSDIR)/scalar.hpp
> $(CLASSDIR)/barray.hpp $(CLASSDIR)/status.hpp
> 	$(CPP) $(CPFLAGS) -c dynamics.cpp
> 
> getargs.$(O): $(CLIB)/getargs.c $(CLIB)/getargs.h
> 	$(CC) $(CFLAGS) -c $(CLIB)/getargs.c
> 
> r250.$(O): r250.cpp r250.hpp randgen.hpp registrar.hpp
> rndlcg.hpp
> 	$(CPP) $(CPFLAGS) $(TRUST_RAND) -c r250.cpp
> 
> sdeint.$(O): sdeint.hpp sdeint.cpp
> $(CLASSDIR)/vector.hpp
> 	$(CPP) $(CPFLAGS) -c sdeint.cpp
> 
> stoi.$(O): $(CLIB)/stoi.c
> 	$(CC) $(CFLAGS) -c $(CLIB)/stoi.c
> 
> #
> #
> # put the code into a library
> #
> $(LIB_NAME): $(LIB_CODE)
> 	-rm $(LIB_NAME)
> 	$(LIB) $(LIB_NAME) $(LIB_FLAGS) $(LIB_COMMAND)
> 	$(RANLIB) $(LIB_NAME)
> #
> #
> # Generic
> #
> .SUFFIXES :
> .SUFFIXES : .cpp .cxx .cc .c .h .$(O)
> 
> .cpp.$(O):
> 	$(CPP) $(CPFLAGS) -c $*.cpp
> 
> .cc.$(O):
> 	$(CPP) $(CPFLAGS) -c $*.cc
> 
> .cxx.$(O):
> 	$(CPP) $(CPFLAGS) -c $*.cxx
> 
> 
> .c.$(O):
> 	$(CC) $(CFLAGS) -c $*.c
> 
> 
> in the latest versio  (gcc (GCC) 3.2.3 20030502 (Red
> Hat Linux 3.2.3-20)) The same Make file generates the
> following Error.
> 
> 
> [rguerrer@mayombe sdeint]$ make
> g++ -DLINUX -traditional-cpp -O -I.  -c standio.cpp
> In file included from
> /usr/include/c++/3.2.3/backward/iostream.h:31,
>                  from standio.hpp:18,
>                  from standio.cpp:10:
> /usr/include/c++/3.2.3/backward/backward_warning.h:32:2:
> warning: #warning This file includes at least one
> deprecated or antiquated header. Please consider using
> one of the 32 headers found in section 17.4.1.2 of the
> C++ standard. Examples include substituting the <X>
> header for the <X.h> header for C++ includes, or
> <sstream> instead of the deprecated header
> <strstream.h>. To disable this warning use
> -Wno-deprecated.
> standio.cpp: In constructor `Stdin::Stdin(char*,
> int)':
> standio.cpp:35: no matching function for call to
> `std::basic_filebuf<char,
>    std::char_traits<char> >::attach(int)'
> standio.cpp: In member function `int
> Stdin::do_open_input(char*, int)':
> standio.cpp:55: invalid conversion from `int' to
> `std::_Ios_Openmode'
> standio.cpp:55:   initializing argument 2 of `void
> std::basic_ifstream<_CharT,
>    _Traits>::open(const char*, std::_Ios_Openmode)
> [with _CharT = char, _Traits
>    = std::char_traits<char>]'
> standio.cpp: In member function `void
> Stdin::open_input(int*, char**, int)':
> standio.cpp:96: no matching function for call to
> `std::basic_filebuf<char,
>    std::char_traits<char> >::attach(int)'
> standio.cpp: In constructor `Stdout::Stdout(char*,
> int)':
> standio.cpp:135: no matching function for call to
> `std::basic_filebuf<char,
>    std::char_traits<char> >::attach(int)'
> standio.cpp: In member function `int
> Stdout::do_open_output(char*, int)':
> standio.cpp:155: invalid conversion from `int' to
> `std::_Ios_Openmode'
> standio.cpp:155:   initializing argument 2 of `void
> std::basic_ofstream<_CharT,
>    _Traits>::open(const char*, std::_Ios_Openmode)
> [with _CharT = char, _Traits
>    = std::char_traits<char>]'
> standio.cpp: In member function `void
> Stdout::open_output(int*, char**, int)':
> standio.cpp:196: no matching function for call to
> `std::basic_filebuf<char,
>    std::char_traits<char> >::attach(int)'
> make: *** [standio.o] Error 1
> 
> If some people know how solve the problem. Pleace
> !Help my!
> 
> _________________________________________________________
> Do You Yahoo!?
> Información de Estados Unidos y América Latina, en Yahoo! Noticias.
> Visítanos en http://noticias.espanol.yahoo.com
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]