<br><br>
<div class="gmail_quote">2009/3/16 Mattias Helsing <span dir="ltr"><<a href="mailto:helsing72@gmail.com">helsing72@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi Ankit,<br><br>ok, so we have problems with our terminologies. You can't link a shell<br>script with anything!<br>
<br>So back to guessing. This time I'm guessing that you (or your script)<br>isn't setting LD_LIBRARY_PATH correctly. Could you check this?<br><font color="#888888"><br>Mattias<br></font>
<div>
<div></div>
<div class="h5"></div></div></blockquote>
<div> </div>
<div> </div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div class="h5"><span id=""></span>Thanks Mattias. There was problem with LD_LIBRARY_PATH only.</div></div></blockquote>
<div>Thanks for all your support and interest in my query.</div>
<div> </div>
<div>Ankit</div>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>
<div class="h5"><span id=""></span><br>On 3/16/09, ankit jain <<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>> wrote:<br>> 2009/3/16 Mattias Helsing <<a href="mailto:helsing72@gmail.com">helsing72@gmail.com</a>><br>
><br>>> Hello Ankit,<br>>><br>>> I think I know what you are trying to do. Correct me if I'm wrong.<br>>><br>>> Your CMake code produces an executable file (you can't run libraries<br>
>> from the commandline) and you want to produce a shellscript that calls<br>>> this executable?<br>>><br>><br>> Thanks for the reply but iam sorry that you misunderstand my question.<br>> My cmake genrates a library. iam not generating a shel script from cmake.<br>
> i already written it. only thing is that iam esxecuting this shell script<br>> through cmake like normal executables. what i want is to link this shell<br>> script with the cmake generated library.<br>> thats it. like we link a cmake generated executable to cmake generated<br>
> library.<br>> here the diff. is that the shell script is not generatde by cmake.<br>><br>> Hope its clear.iam giving my folder structure to you.<br>><br>> Main<br>> ....cmakelist.txt<br>> ....shell_script.sh<br>
><br>><br>><br>>> Libraries are stored in some other folder outside main folder.<br>>><br>> ankit<br>><br>><br>>> You could for example create a shell script template and use the<br>>> configure_file command, e.i.<br>
>><br>>> in file <a href="http://shscript.sh.in/" target="_blank">shscript.sh.in</a>:<br>>> #!/bin/sh<br>>> #<br>>> @PROJECT_BINARY_DIR@/bin/@TARGET_NAME@ $1 $2 $3<br>>><br>>> in file CMakeLists.txt<br>
>> set(TARGET_NAME <your_executable_target>)<br>>> configure_file(<a href="http://shscript.sh.in/" target="_blank">shscript.sh.in</a> ${PROJECT_BINARY_DIR}/bin/shscript.sh)<br>>><br>>> not at all the prettiest solution and I'm not really sure why you want<br>
>> to do this but good luck<br>>> Mattias<br>>><br>>> On 3/13/09, ankit jain <<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>> wrote:<br>>> > 2009/3/13 Mattias Helsing <<a href="mailto:helsing72@gmail.com">helsing72@gmail.com</a>><br>
>> ><br>>> >> Hello Ankit,<br>>> >><br>>> >> On 3/13/09, ankit jain <<a href="mailto:ankitguddu@gmail.com">ankitguddu@gmail.com</a>> wrote:<br>>> >> > Hi all,<br>
>> >> ><br>>> >> > I have a shell script. I want to link it with a library that i have<br>>> >> > build<br>>> >> > using cmake. Is it possible to do so.<br>>> >> > I am running this shell script using cmake.<br>
>> >><br>>> >> You need to describe what you want to do in much more detail. What<br>>> >> kind of link are you talking about? The first interpretation I made<br>>> >> was that you are using a linker to link a library and a shell script<br>
>> >> into <whatever>. Is it that you<br>>> >> * want to call the linker from the script?<br>>> >> * linking them in the context of packaging so they get installed<br>>> >> together?<br>
>> >> * <more wild guesses><br>>> >><br>>> >> Perhaps you could take a look at<br>>> >> <a href="http://www.catb.org/~esr/faqs/smart-questions.html" target="_blank">http://www.catb.org/~esr/faqs/smart-questions.html</a><br>
>> >> so that we(I or any real cmake expert) can at least have a chance of<br>>> >> helping you without wild guesses.<br>>> >><br>>> >> Mattias<br>>> >><br>>> ><br>
>> ><br>>> >> Iam sorry that i am not able to explain you properly.<br>>> >><br>>> > Actually in my shl scripts there are certains commadns that i use.<br>>> > these<br>
>> > commands are nothing but executbale which require some arguments. these<br>>> > executables are actaully created by cmake. Also certain commands can<br>>> > only<br>>> > be<br>>> > run from some libraries which are build by cmake.<br>
>> ><br>>> > I am actually getting errors while running that shell script.<br>>> > Error are like: <command_name> not found.<br>>> > It is because iam not able to link that shell script or say not able to<br>
>> > include that library into the shell script. I dotn know how to link a<br>>> > library with shell script so that while executing it gets all the supor<br>>> tof<br>>> > the library which it requires.<br>
>> ><br>>> > As you have asked about linker not explicitly iam passing anything to<br>>> > linker calling linker from shell script.<br>>> ><br>>> > My need is to simple run the shell script which need a support of a<br>
>> > library.<br>>> > Toa chieve it how to link thast library to shell script i dont know. It<br>>> > might be like you said calling linker from shell script. i dontknow how<br>>> it<br>>> > can be achieved.<br>
>> ><br>>> > You tell me in general sense if this the senario how to do it.<br>>> ><br>>> > I hope i make problem somewhat clear to you.<br>>> ><br>>> > Ankit<br>>> ><br>
>> >><br>>> >> ><br>>> >> > If possible plz let me show an example.<br>>> >> ><br>>> >> ><br>>> >> > Ankit<br>>> >> ><br>
>> >><br>>> ><br>>><br>><br></div></div></blockquote></div><br>