Closed DJuego closed 9 years ago
I am trying to create two functions: FromPaqueteToMsgPack and FromMsgPackToPaquete.
int DeMsgPackAPaquete(const std::unique_ptrMsgPack::Element msgpack, Paquete &paquete); int DePaqueteAMsgPack(const Paquete paquete, std::unique_ptrMsgPack::Element &msgpack);
It works... partially. There are problems with the negative numbers in angulo var. I do not know if the approximation is correct.
It works in Visual Studio. And MinGW gcc 4.9.2 (debug) but in MinGW gcc 5.1.0 there are undefined references :-( Would you guide me?
Thx
Here is the code:
http://paste.ofcode.org/EnwpUuSBX9YMjDWXn8jGVA
Here is the result (MinGW gcc 5.1.0). g++.exe -Llib\Debug -o bin\Debug\TestRapido.exe obj\Debug\main.o obj\Debug\UtilidadesMsgPack.o -lnetlink obj\Debug\UtilidadesMsgPack.o: In function `long long MsgPack::Number::getValue<long long>() const': P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:51: undefined reference to `loadFloat32(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:53: undefined reference to `loadFloat64(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:55: undefined reference to `loadUint8(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:57: undefined reference to `loadUint16(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:59: undefined reference to `loadUint32(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:61: undefined reference to `loadUint64(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:63: undefined reference to `loadInt8(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:65: undefined reference to `loadInt16(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:67: undefined reference to `loadInt32(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:69: undefined reference to `loadInt64(unsigned char const*)' obj\Debug\UtilidadesMsgPack.o: In function `float MsgPack::Number::getValue<float>() const': P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:51: undefined reference to `loadFloat32(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:53: undefined reference to `loadFloat64(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:55: undefined reference to `loadUint8(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:57: undefined reference to `loadUint16(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:59: undefined reference to `loadUint32(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:61: undefined reference to `loadUint64(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:63: undefined reference to `loadInt8(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:65: undefined reference to `loadInt16(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:67: undefined reference to `loadInt32(unsigned char const*)' P:\Mis-Proyectos\Cross-compilados\EV3\TestRapido/inc/netLink/include/Number.h:69: undefined reference to `loadInt64(unsigned char const*)' collect2.exe: error: ld returned 1 exit status Process terminated with status 1 (0 minute(s), 0 second(s)) 21 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I pushed a commit... Could you try it again?
It works! Problem solved! ;-)
I am trying to create two functions: FromPaqueteToMsgPack and FromMsgPackToPaquete.
int DeMsgPackAPaquete(const std::unique_ptrMsgPack::Element msgpack, Paquete &paquete); int DePaqueteAMsgPack(const Paquete paquete, std::unique_ptrMsgPack::Element &msgpack);
It works... partially. There are problems with the negative numbers in angulo var. I do not know if the approximation is correct.
It works in Visual Studio. And MinGW gcc 4.9.2 (debug) but in MinGW gcc 5.1.0 there are undefined references :-( Would you guide me?
Thx
Here is the code:
http://paste.ofcode.org/EnwpUuSBX9YMjDWXn8jGVA