-
Notifications
You must be signed in to change notification settings - Fork 111
error in make #5
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
Comments
Hi mujtabahasan, First, sorry for taking so long to respond - I received no notification of the issue. So this issue is something I experience also. If I remember correctly, the problem is that the unique_ptr and shared_ptr types are defined in different headers on Mac OS X and Linux systems. Really I should code it such that it works on either system without any changes but I just manually edited the files each time I switched; the laziness of programmers never ceases to amaze! It's been a while since I've done this myself so take a look on stack overflow as it's a common issue. Regards, |
(I'll keep the issue open while you debug 👍) |
Hi, |
Hi, |
Sorry, I had the same problem before but I was not the one who solved it.
Very Best,
Di
…On Tue, Dec 21, 2021 at 10:44 PM niurencheng ***@***.***> wrote:
Hi,
I'm also facing this problem with ubuntu, Can you tell me what should I do
to fix it? (w.r.t. what you said about unique_ptr and shared_ptr.)
Best, Thank you
Di
—
Reply to this email directly, view it on GitHub
<#5 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ALNN52K4YMBI7BYWQSZ6HHDUSFXTNANCNFSM4F3D3ARQ>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
You are receiving this because you commented.Message ID:
***@***.***>
|
你是中国人吗?可以加个微信15111027704,一起讨论下嘛?谢谢啦 |
change the book.cpp line 257 |
Hi,
I cannot make the code after successfully configuring it. Below is the error log.
Thanks,
Mujtaba
[ 14%] Built target catch
[ 29%] Built target yaml-cpp
[ 44%] Built target spdlog
[ 46%] Building CXX object src/CMakeFiles/rl_engine.dir/market/book.cpp.o
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = FloatComparator<>; long unsigned int DEPTH = 1ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:368:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = FloatComparator<>; long unsigned int DEPTH = 2ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:369:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = FloatComparator<>; long unsigned int DEPTH = 3ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:370:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = FloatComparator<>; long unsigned int DEPTH = 4ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:371:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = FloatComparator<>; long unsigned int DEPTH = 5ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:372:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = ReverseFloatComparator<>; long unsigned int DEPTH = 1ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:374:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = ReverseFloatComparator<>; long unsigned int DEPTH = 2ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:375:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = ReverseFloatComparator<>; long unsigned int DEPTH = 3ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:376:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = ReverseFloatComparator<>; long unsigned int DEPTH = 4ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:377:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp: In instantiation of ‘bool market::Book<C, DEPTH>::PlaceOrder(double, long int) [with C = ReverseFloatComparator<>; long unsigned int DEPTH = 5ul]’:
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:378:24: required from here
/home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:257:54: error: call of overloaded ‘make_unique(double&, long int&, long int)’ is ambiguous
open_orders.emplace(price, make_unique(price, size, volume(price
^
In file included from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:4:0:
/home/mujtaba.hasan/Documents/RL/rl_markets/include/utilities/memory.h:5:20: note: candidate: std::unique_ptr<_Tp> make_unique(Args&& ...) [with T = market::Order; Args = {double&, long int&, long int}]
std::unique_ptr make_unique( Args&& ...args )
^
In file included from /usr/include/c++/5/memory:81:0,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/order.h:4,
from /home/mujtaba.hasan/Documents/RL/rl_markets/include/market/book.h:10,
from /home/mujtaba.hasan/Documents/RL/rl_markets/src/market/book.cpp:1:
/usr/include/c++/5/bits/unique_ptr.h:764:5: note: candidate: typename std::_MakeUniq<_Tp>::__single_object std::make_unique(_Args&& ...) [with _Tp = market::Order; _Args = {double&, long int&, long int}; typename std::_MakeUniq<_Tp>::__single_object = std::unique_ptrmarket::Order]
make_unique(_Args&&... __args)
^
src/CMakeFiles/rl_engine.dir/build.make:158: recipe for target 'src/CMakeFiles/rl_engine.dir/market/book.cpp.o' failed
make[2]: *** [src/CMakeFiles/rl_engine.dir/market/book.cpp.o] Error 1
CMakeFiles/Makefile2:220: recipe for target 'src/CMakeFiles/rl_engine.dir/all' failed
make[1]: *** [src/CMakeFiles/rl_engine.dir/all] Error 2
Makefile:94: recipe for target 'all' failed
make: *** [all] Error 2
The text was updated successfully, but these errors were encountered: