lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
980 stars 388 forks source link

1.3.1 to 1.4.0 missing cast leads to compiler error #337

Open daveHitchman opened 3 years ago

daveHitchman commented 3 years ago

In vsn 1,3,1 the output had: const __lcm_hash_ptr cp = { p, (void*)tXXXXX:getHash };

now it has const __lcm_hash_ptr cp = { p, tXXXXX::getHash };

I dont know why the cast to (void) was dropped but the compiler wont take it because getHash is NOT the same type as hash_ptr : error error: invalid conversion from 'int64_t ()() {aka long long int ()()}' to 'void' [-fpermissive]

cby-gh commented 3 years ago

Hi daveHitchman, I get the same problem, do you get the solution?

hoxell commented 3 years ago

This maybe can help?

daveHitchman commented 3 years ago

Hi, yes, seems there was a header file issue and not everything was actually updated. Make sure you have the right headerfiles for the code files and maybe it will work out for you as it did for me. Good luck :)

On Sat, 9 Jan 2021 at 05:15, cby-gh notifications@github.com wrote:

Hi daveHitchman, I get the same problem, do you get the solution?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lcm-proj/lcm/issues/337#issuecomment-757092596, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL3B5DT2SHDUW7ATSEZGL43SY7J7RANCNFSM4S4HNT2Q .

cby-gh commented 3 years ago

This maybe can help?

yes, it's same question, I have fixed the problem, compiler find wrong header file from other location, thanks

cby-gh commented 3 years ago

Hi, yes, seems there was a header file issue and not everything was actually updated. Make sure you have the right headerfiles for the code files and maybe it will work out for you as it did for me. Good luck :) On Sat, 9 Jan 2021 at 05:15, cby-gh @.***> wrote: Hi daveHitchman, I get the same problem, do you get the solution? — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#337 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AL3B5DT2SHDUW7ATSEZGL43SY7J7RANCNFSM4S4HNT2Q .

thanks my friend, the compiler finds wrong header file from other location, now everything is fine, :)

bluesquall commented 1 year ago

I'm seeing something related with both 1.4.0 and 1.5.0 in a container, so no chance it is finding an old lcm_coretypes.h.

To avoid necrobumping, I'm opening a new issue (#450) and just leaving this comment here for anyone who finds this issue first when searching.