MagmaDNN / magmadnn

MagmaDNN: a simple deep learning framework in c++
MIT License
45 stars 7 forks source link

Building issues #40

Closed Jmalinza closed 4 years ago

Jmalinza commented 4 years ago

I'm successfully building the shared libraries without errors. However, when im building tests or even the hello_world program, I am getting undefined reference errors.

When inspecting the library file usingn nm, i get the following:

[~/Library/magmadnn/lib]$ nm libmagmadnn.so 0000000000201020 B bss_start 0000000000201020 b completed.7698 w __cxa_finalize 0000000000000440 t deregister_tm_clones 00000000000004d0 t do_global_dtors_aux 0000000000200e88 t do_global_dtors_aux_fini_array_entry 0000000000201018 d dso_handle 0000000000200e90 d _DYNAMIC 0000000000201020 D _edata 0000000000201028 B _end 000000000000051c T _fini 0000000000000510 t frame_dummy 0000000000200e80 t frame_dummy_init_array_entry 0000000000000528 r FRAME_END 0000000000201000 d _GLOBAL_OFFSETTABLE w gmon_start 0000000000000408 T _init w _ITM_deregisterTMCloneTable w _ITM_registerTMCloneTable 0000000000000480 t register_tm_clones 0000000000201020 d __TMC_END

The library is clearly not including any of the definitions included in the magmadnn namespace. Where and I going wrong?

Environment:

Jmalinza commented 4 years ago

Solved by changing line 39 of make.inc #o_ext = .o

anyone care to explain why this made such a huge difference?

Dando18 commented 4 years ago

What build system did you use: the makefile or CMake?

Jmalinza commented 4 years ago

I used a makefile.

funnily enough, I tried to compile on a different machine and had the same problem of an "empty" library file