You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it executes but returns basically the following errors:
../../../libtorch/include/torch/csrc/jit/ir/ir.h: At global scope:
../../../libtorch/include/torch/csrc/jit/ir/ir.h:302:42: error: function 'std::shared_ptr<torch::jit::Wrap<torch::jit::Value> > torch::jit::Value::wrap()' definition is marked dllimport
302 | TORCH_API std::shared_ptr<Wrap<Value>> wrap() {
| ^~~~
../../../libtorch/include/torch/csrc/jit/ir/ir.h:1138:42: error: function 'std::shared_ptr<torch::jit::Wrap<torch::jit::Block> > torch::jit::Block::wrap()' definition is marked dllimport
1138 | TORCH_API std::shared_ptr<Wrap<Block>> wrap() {
| ^~~~
and:
../../../libtorch/include/c10/macros/Macros.h:432:5: error: '__assert_fail' was not declared in this scope; did you mean '__fastfail'?
432 | __assert_fail( \
| ^~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
A workaround i found for the last error "__assert_fail not declared" was adding "-DNDEBUG", supposedly turning off asserts, although i am still researching to better understand what are the implications of it.
MODULE_API’s definition was in some codepath that thought it wasn’t going to compile the definition in ModuleInterface.cpp. It is an error to have a declaration with “this comes from another library” (what dllimport means) and then provide a definition for it.
TORCH_API in this case
That solved that problem, but i am still unable to compile due to several "undefined reference to imp"
like this one:
C:/msys64/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/14.2.0/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\Fred\AppData\Local\Temp\cc3lSCmS.o:silero_torch.c:(.text$_ZN5torch3jit6Object10run_methodIJEEEN3c106IValueERKSsDpOT_[_ZN5torch3jit6Object10run_methodIJEEEN3c106IValueERKSsDpOT_]+0x90): undefined reference to `__imp__ZNK5torch3jit6MethodclESt6vectorIN3c106IValueESaIS4_EERKSt13unordered_mapISsS4_St4hashISsESt8equal_toISsESaISt4pairIKSsS4_EEE'
collect2.exe: error: ld returned 1 exit status
I am not a very experienced programmer, so excuse me for any simple confusion.
(running on Windows 11-64x, forgot to say)
I am trying to compile the C++ Libtorch example but running on few errors:
When i run the standard compilation line from the the readme, corrected for the location of my libtorch:
i get the following error:
I don´t understand what argument is missing there. Any insights?
removing the Option -Wl,-rapth, :
it executes but returns basically the following errors:
and:
The text was updated successfully, but these errors were encountered: