Giter Site home page Giter Site logo

issue building constantq about constantq HOT 2 OPEN

grrrr avatar grrrr commented on May 29, 2024
issue building constantq

from constantq.

Comments (2)

grrrr avatar grrrr commented on May 29, 2024

Hi, i am sorry to say that i am unable to test compilation under Windows. Someone else will have to comment on that. The M_LN2 constant would be easy to define, it's the natural logarithm of two.

from constantq.

esantossilva avatar esantossilva commented on May 29, 2024

I'm not sure if what I'm trying to do is completely wrong, but I've tried to create the function "max" similarly to the "min" function already defined in the main.cpp file.

the min function was:
template<typename T,typename T2>
static T min(T x,T2 y) { return x<y?x:y; }

and I declared the max function as:
template<typename T,typename T2>
static T max(T x,T2 y) { return x>y?x:y; }

when I do this, I get this new error:

C:\constantq>C:\pd\flext\build pd msvc

C:\constantq>nmake -f "C:\pd\flext\buildsys\nmake.mak" PLATFORM=win RTSYS=pd COM
PILER=msvc BUILDPATH=C:\pd\flext\buildsys\

Microsoft (R) Program Maintenance Utility Version 14.00.24210.0
Copyright (C) Microsoft Corporation. All rights reserved.

    "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\nmake.exe" /

NOLOGO /f C:\pd\flext\buildsys\nmake-sub.mak PLATFORM=win RTSYS=pd COMPILER=msv
c BUILDPATH=C:\pd\flext\buildsys\ PKGINFO=package.txt BUILDCLASS=ext TARGETMODE
=release TARGETTYPE=single build
cl /c /DNDEBUG /Ox /G6 /arch:SSE /LD /EHsc /GR /Oi /nologo /D_CRT_SECU
RE_NO_DEPRECATE /DWIN32 /D_WINDOWS /MT /DFLEXT_SYS=2 /DPD /D_WIN32_WINNT=0x500
/I"C:\pthreads-win32\include" /I"C:\pd"\src /I"C:\pd"\include /I"C:\pd"\include
\pd /I"C:\pd"\flext\source\lockfree /I"C:\pd"\flext .\main.cpp /Fopd-msvc\releas
e-single\main.obj
cl : Command line warning D9002 : ignoring unknown option '/G6'
main.cpp
.\main.cpp(54): error C2440: '?': cannot convert from 'blitz::_bz_ArrayExpr<blit
z::_bz_ArrayExprBinaryOp<blitz::_bz_ArrayExpr<blitz::FastArrayIterator<float,1>>
,blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprBinaryOp<blitz::_bz_ArrayExpr<blitz::F
astArrayIterator<float,1>>,blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant>
,blitz::Multiply<float,double>>>,blitz::Greater<float,double>>>' to 'bool'
with
[
T=double
]
.\main.cpp(54): note: No user-defined-conversion operator available that can per
form this conversion, or the operator cannot be called
.\main.cpp(302): note: see reference to function template instantiation 'T `anon
ymous-namespace'::max<blitz::Array<t_sample,1>,blitz::_bz_ArrayExpr<blitz::_bz_A
rrayExprBinaryOp<blitz::_bz_ArrayExpr<blitz::FastArrayIterator<float,1>>,blitz::
_bz_ArrayExpr<blitz::_bz_ArrayExprConstant>,blitz::Multiply<float,double

(T,T2)' being compiled
with
[
T=blitz::Array<t_sample,1>,
T2=blitz::_bz_ArrayExpr<blitz::_bz_ArrayExprBinaryOp<blitz::_bz_Arra
yExpr<blitz::FastArrayIterator<float,1>>,blitz::_bz_ArrayExpr<blitz::_bz_ArrayEx
prConstant>,blitz::Multiply<float,double>>>
]
.\main.cpp(54): error C2446: ':': no conversion from 'int' to 'blitz::Array<int,
1>'
.\main.cpp(54): note: Constructor for class 'blitz::Array<int,1>' is declared 'e
xplicit'
c:\constantq\headers/constantq.hpp(96): note: see reference to function template
instantiation 'T `anonymous-namespace'::max<blitz::Array<int,1>,int>(T,T2)' bei
ng compiled
with
[
T=blitz::Array<int,1>,
T2=int
]
c:\constantq\headers/constantq.hpp(86): note: while compiling class template mem
ber function 'ConstantQ<t_sample,false>::ConstantQ(float,const blitz::Array<t_sa
mple,1> &,const blitz::Array<t_sample,1> &,const Window::Base<t_sample> &,T,int,
int)'
with
[
T=t_sample
]
.\main.cpp(600): note: see reference to function template instantiation 'Constan
tQ<t_sample,false>::ConstantQ(float,const blitz::Array<t_sample,1> &,const blitz
::Array<t_sample,1> &,const Window::Base<t_sample> &,T,int,int)' being compiled
with
[
T=t_sample
]
.\main.cpp(134): note: see reference to class template instantiation 'ConstantQ<
t_sample,false>' being compiled
.\main.cpp(54): error C2440: '?': cannot convert from 'blitz::_bz_ArrayExpr<blit
z::_bz_ArrayExprBinaryOp<blitz::_bz_ArrayExpr<blitz::FastArrayIterator<int,1>>,b
litz::_bz_ArrayExpr<blitz::_bz_ArrayExprConstant>,blitz::Greater<int,int>>>'
to 'bool'
with
[
T=int
]
.\main.cpp(54): note: No user-defined-conversion operator available that can per
form this conversion, or the operator cannot be called
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files (x86)\Microsoft Visual Studio 14.0
\VC\BIN\nmake.exe"' : return code '0x2'
Stop.

C:\constantq>goto end

C:\constantq>

from constantq.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.