psycharo-zz / factor-graph

matlab/c++ factor graph framework
32 stars 8 forks source link

compilation breaks #23

Closed ghost closed 12 years ago

ghost commented 12 years ago

I followed the wiki and got this:

>> mex mexfactorgraph.cpp ..\factornode.cpp ..\addnode.cpp ..\equalitynode.cpp
C:\Users\BDEVRI~1.HEA\AppData\Local\Temp\mex_2NpklV\mexfactorgraph.obj:mexfactorgraph.cpp:(.text+0x1299): undefined reference to `vtable for CustomNode' 
C:\Users\BDEVRI~1.HEA\AppData\Local\Temp\mex_2NpklV\mexfactorgraph.obj:mexfactorgraph.cpp:(.text+0x31c3): undefined reference to `vtable for CustomNode' 
c:/mingw64/bin/../lib/gcc/x86_64-w64-mingw32/4.6.3/../../../../x86_64-w64-mingw32/bin/ld.exe: C:\Users\BDEVRI~1.HEA\AppData\Local\Temp\mex_2NpklV\mexfactorgraph.obj: bad reloc address 0x104 in section `.rdata' 
collect2: ld returned 1 exit status 

  C:\PROGRA~1\MATLAB\R2012B\BIN\MEX.PL: Error: Link of 'mexfactorgraph.mexw64' failed. 

Error using mex (line 206)
Unable to complete successfully. 
206     throw(exception);

Probably I need to add message.cpp and/or network.cpp to the mex statement but I'm not sure. In any case, do you have an idea of what goes wrong?

psycharo-zz commented 12 years ago

Yes just add all the. cpp files to the command

ghost commented 12 years ago

thx, this works:

mex mexfactorgraph.cpp customnode.cpp ..\factornode.cpp ..\addnode.cpp ..\equalitynode.cpp ..\message.cpp ..\network.cpp