LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to add .so file to the makefile(LINUX) (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-add-so-file-to-the-makefile-linux-4175537876/)

rajkar 03-26-2015 02:24 AM

How to add .so file to the makefile(LINUX)
 
I want to add a TBB dynamic library in Makefile.
I m using .libirml.so in the makefile. It shows the error like that:libirml.so.1 file not recognized: File format not recognized

How to proceed further TO finish the task?

pan64 03-26-2015 03:04 AM

whould be nice to show that makefile, also post what you have tried exactly and what was the error message exactly.

rajkar 03-26-2015 04:23 AM

Need to include TBB libs in makefile.
 
TBB LIBS included in makefile are: -lirml -ltbb -ltbb_preview...

Error:TBB/libirml.so.1: file not recognized: File format not recognized
collect2: ld returned 1 exit status

pan64 03-26-2015 04:28 AM

looks like you mixed 32-64 bit libraries (or something similar).
what will file libirml.so.1 respond? What kind of OS/compiler do you have, what is your target platform?

rajkar 03-26-2015 04:44 AM

Linux OS,TBB .so files and am include in Makefile but it return the error like tht.
gcc compiler .
I am using c++ in Linux OS.

btmiller 03-26-2015 07:31 AM

As pan64 pointed out, there seems to be a problem with your libirml.so.1 file. Either it's not a valid library file or it is for a different architecture. You need to run the "file" command that pan64 posted and show the outputs.

rajkar 03-27-2015 02:26 AM

To check whether .so file.1 is valid file or not.
 
How to check the libirml.so.1 file in Linux.

pan64 03-27-2015 03:35 AM

see post #4, but checking a single file is not enough, see #2

John VV 03-27-2015 01:21 PM

or you placed the lib in a non standard location
i have this issue sometimes if i build NEW code on older OS's

-- 64 bit defaults
/usr/lib64/LibName.so ( /usr/lib64/libQt5Core.so.5.3.2 )
/usr/lib64/GroupName/LibName.so ( /usr/lib64/gegl-0.2/gegl-buffer-load-op.so )


if not in /usr/lib64

you need to add it to ldconf
or if using autotools it has a .pc file for packageconfig
or
export the location in the makefile


if this is a simple hand wrote Makefile ( say 20 lines or so )
post it


All times are GMT -5. The time now is 09:29 PM.