07-24-2012 04:55 PM
I purchase the CVI Linux module a few months ago and finally installed it. I have a simple program that converts a file of binary data to text data. I can easily compile the single .c file. When I attempt to build the .prj file, however, I get the following error message: ".....toolslib/toolbox/toolbox.o: undefined reference to symbol 'dlopen@@GLIBC_2.1'. 'dlopen...' is defined in DSO /lib/libdl.so.2 so try adding it to the linker command line.' I thought I did that with the command cvicc -l/lib/libdl.so.2 Bin_to_Txt.prj, but the output of this command includes the message "...cannot find -l/lib/libdl.so.2". libdl.so.2 is located in /lib. Does anyone have any ideas on how to get the linker to find the file? Thanks.
07-24-2012 05:00 PM
I will preface this by saying that I'm not a CVI expert, but this is my suggestion based on Linux knowledge. Usually the -l linker option takes the name of a shared library, not a path. Try "-ldl" instead of "-l/lib/libdl.so.2".
07-25-2012 09:18 AM
Adam, Thanks for the info. Adding -ldl to the cvicc command led to a successful build (after I commented out a call to DebugPrintf). I put in the full path initially because I didn't find any environment variables set for library (or header file) search paths. I assume that cvicc has default search paths for both, but I didn't see any reference to paths in the (rather scant) documentation.
Unfortunately, the program (which runs fine under XP) didn't run correctly under Linux. I might post another question related to these problems in the future.
07-25-2012 10:05 AM
I'm glad to hear that this worked. There is a default search path. Typically at least /lib and /usr/lib are included, but I don't know what the cvi linker uses. You can add paths for the linker to search using -L/path/to/search.