cutil_inline.h error Execution problem with cutil_inline.h

Hi,

When I am trying to issue command like “nvcc main.cpp”; it returns me this error:

In file included from main.cpp:33:
snn.h:8: fatal error: cutil_inline.h: No such file or directory
compilation terminated.

Can anyone tell me where is the problem? Obviously cutil_inline.h is located in the current directory from which the command is executed.

Just add a “-I<SDK_HOME>/C/common/inc” to your nvcc command line, with <SDK_HOME> being the place where you installed the GPU computing SDK.

Hi Gilles,

I followed your suggestion and the error is no more shown. Thanks a lot. However it is showing so many warnings as pasted below. What does these mean? Can I ignore them?

“main.cpp: In function ‘int main()’:
main.cpp:41: warning: deprecated conversion from string constant to ‘char’
main.cpp:47: warning: deprecated conversion from string constant to ‘char
’
main.cpp:51: warning: deprecated conversion from string constant to ‘char’
main.cpp:56: warning: deprecated conversion from string constant to ‘char
’
main.cpp:61: warning: deprecated conversion from string constant to ‘char’
main.cpp:66: warning: deprecated conversion from string constant to ‘char
’
main.cpp:69: warning: deprecated conversion from string constant to ‘char’
main.cpp:102: warning: deprecated conversion from string constant to ‘char
’
main.cpp:107: warning: deprecated conversion from string constant to ‘char’
main.cpp:109: warning: deprecated conversion from string constant to ‘char
’
/tmp/tmpxft_00006f2e_00000000-1_main.o: In function main': main.cpp:(.text+0x43): undefined reference to CpuSNN::CpuSNN(int, int, int, char*, int)’
main.cpp:(.text+0x7c): undefined reference to CpuSNN::createInitGroup(char*, int, float, float, float, float)' main.cpp:(.text+0xbb): undefined reference to CpuSNN::createInitGroup(char*, int, float, float, float, float)’
main.cpp:(.text+0xfe): undefined reference to CpuSNN::connect(int, int, char*, float, int, unsigned char, unsigned char)' main.cpp:(.text+0x13b): undefined reference to CpuSNN::connect(int, int, char*, float, int, unsigned char, unsigned char)’
main.cpp:(.text+0x178): undefined reference to CpuSNN::connect(int, int, char*, float, int, unsigned char, unsigned char)' main.cpp:(.text+0x194): undefined reference to CpuSNN::snnProperty(char*, float)’
main.cpp:(.text+0x1b8): undefined reference to CpuSNN::randomNoiseCurrent(float, float, int)' main.cpp:(.text+0x213): undefined reference to CpuSNN::stdp(float, float, float, float)’
main.cpp:(.text+0x252): undefined reference to CpuSNN::spikeMonitor(int, float, int)' main.cpp:(.text+0x276): undefined reference to CpuSNN::spikeMonitor(int, float, int)’
main.cpp:(.text+0x2a3): undefined reference to CpuSNN::runNetwork(int, int, int)' main.cpp:(.text+0x2c1): undefined reference to CpuSNN::printHistogram(char*, bool, unsigned int)’
main.cpp:(.text+0x2e2): undefined reference to CpuSNN::rasterPlot(int, char*, bool)' main.cpp:(.text+0x303): undefined reference to CpuSNN::rasterPlot(int, char*, bool)’
main.cpp:(.text+0x335): undefined reference to CpuSNN::printSimSummary(_IO_FILE*)' main.cpp:(.text+0x34b): undefined reference to CpuSNN::~CpuSNN()’
main.cpp:(.text+0x368): undefined reference to `CpuSNN::~CpuSNN()’
collect2: ld returned 1 exit status”

Kindly let me know. Thank you.

The warnings mean that you are performing some deprecated conversions from C++ strings into old-style C ones that are actually char*.
The errors are some link-edition errors, most likely complaining about a missing library, that could be libssn.a? Try to add to your command line “-L<libssn_home> -lssn” (supposing the library is called libssn.a or libssn.so) with <libssn_home> being the location of the library. If the library is in the current working directory, you usually don’t need the “-L.”.

Hi,

I couldn’t find package by name libssn.a, however I found libssl.a on google. Do you mean libssl or you meant libssn itself? If so, I couldn’t find libssn package. Could you kindly let me know from where to download the package?Hi,

I couldn’t find package by name libssn.a, however I found libssl.a on google. Do you mean libssl or you meant libssn itself? If so, I couldn’t find libssn package. Could you kindly let me know from where to download the package?

I misspelled it (mixed-up between “ssn” and “snn”) so forget about libssl.
It should be, I guess, libsnn.a since you have “snn.h” included in your main.c, and the linker complaining about missing symbols starting with “CpuSNN”. Don’t you have a libsnn.a somewhere? If so, add “-Lxxxx -lsnn” as explained previously.

Hi,

I didn’t find libsnn.a on my system. I looked for libsnn package on google but there is no such package. What do you suggest me to do? Kindly let me know. Thank you.

I suggest you to check where your main.cpp comes from, and where your snn.h comes from. Since you have a snn.h, it’s unlikely it came out of the blue, and since apparently it corresponds to create a class called CpuSNN, for which the functions are not inline, you have to have it compiled somewhere.
It looks like snn.h is inside the same directory as main.cpp so finding the sources of CpuSNN shouldn’t be too complicated (like they are on your current directory)…
If so, compile them and link them to your main.o to create your binary.
Since apparently the code is not yours, don’t you have a README file of some sort explaining how to compile it? What would a simple “make” do?