Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: redeclaration of void iulib::addscaled #3

Open
ghost opened this issue Jul 5, 2017 · 1 comment
Open

error: redeclaration of void iulib::addscaled #3

ghost opened this issue Jul 5, 2017 · 1 comment

Comments

@ghost
Copy link

ghost commented Jul 5, 2017

Hi, I'm trying to build iulib on ubuntu 16.06

rdi@rdi-adam:iulib (master)$ scons
scons: Reading SConscript files ...
compiling with high optimization
Checking for png_byte in C library png... (cached) yes
Checking for jpeg_std_error() in C library jpeg... (cached) yes
Checking for inflate in C library z... (cached) yes
Checking for TIFFOpen() in C library tiff... (cached) yes
Checking for C++ header file SDL/SDL_gfxPrimitives.h... (cached) yes
Checking for C++ header file SDL/SDL.h... (cached) yes
scons: done reading SConscript files.
scons: Building targets ...
g++ -o imglib/imgops.os -c -g -O3 -fPIC -Wall -D__warn_unused_result__=__far__ -g -fPIC -fPIC -I. -Icolib -Iimglib -Iimgio -Iimgbits -Iutils -Icomponents -Ividio imglib/imgops.cc
imglib/imgops.cc:136:40: error: redeclaration of 'template<class T, class V> void iulib::addscaled(colib::narray<T>&, colib::narray<T>&, V, int, int)' may not have default arguments [-fpermissive]
             V scale=1,int dx=0,int dy=0) {
                                        ^
In file included from ./colib/colib.h:55:0,
                 from imglib/imgops.cc:35:
./colib/debugf.h:30:10: warning: 'void {anonymous}::iprintf(FILE*, int, const char*, ...)' defined but not used [-Wunused-function]
     void iprintf(FILE *stream,int depth,const char *fmt,...) {
          ^
./colib/debugf.h:69:10: warning: 'void {anonymous}::debugf(const char*, const char*, ...)' defined but not used [-Wunused-function]
     void debugf(const char *which,const char *fmt,...) {
          ^
scons: *** [imglib/imgops.os] Error 1
scons: building terminated because of errors.
@MohamadIsmail
Copy link

MohamadIsmail commented Jul 6, 2017

You need to add default arguments in the header file "imgops.h" and remove them from the source file "imgops.cc" to avoid "redefinition of default argument" error.

@ghost ghost mentioned this issue Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant