That indeed works but WHY?

On Thu, Feb 18, 2016 at 10:23 AM, Glenn Jackman <[email protected]> wrote:

> I *think* what's happening is the sh version with backticks will split the
> result of the backticked command into *words*, while fish will split the
> result into *lines*. So you're handing gcc the argument "-z relro -WI"
> instead of "-z" "relro" "-WI", etc.
>
> You might try, and this is a guess,
>
>     eval gcc -o snmpdemoapp snmpdemoapp.o (net-snmp-config --libs)
>
>
> On Thu, Feb 18, 2016 at 10:15 AM, John Chludzinski <
> [email protected]> wrote:
>
>> When I try to compile some SNMP code there's an inline command I need to
>> get the required libs. When I run the command in fish, using () I get the
>> following:
>>
>> gcc -o snmpdemoapp snmpdemoapp.o (net-snmp-config --libs)
>>
>> /usr/bin/ld: warning: -z relro -Wl ignored.
>> /usr/bin/ld: warning: -z now -L/usr/lib -lnetsnmp -lssl -lssl -lcrypto
>> -lm ignored.
>> snmpdemoapp.o: In function `main':
>> /home/jski/amp-v-e-switch/vis/snmp/snmpdemoapp.c:28: undefined reference
>> to `init_snmp'
>> ...
>> pdemoapp.c:101: undefined reference to `snmp_perror'
>> /home/jski/amp-v-e-switch/vis/snmp/snmpdemoapp.c:89: undefined reference
>> to `snmp_sess_perror'
>> collect2: error: ld returned 1 exit status
>>
>>
>>
>> When I used Bourne, it works:
>>
>> gcc -o snmpdemoapp snmpdemoapp.o `net-snmp-config --libs`
>>
>> Why?
>>
>> ---John
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Site24x7 APM Insight: Get Deep Visibility into Application Performance
>> APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
>> Monitor end-to-end web transactions and take corrective actions now
>> Troubleshoot faster and improve end-user experience. Signup Now!
>> http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
>> _______________________________________________
>> Fish-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/fish-users
>>
>>
>
>
> --
> *Glenn Jackman*
> Senior Software Developer
>
> *Pythian - Love your data*
> [email protected]
> Tel: +1 613 565 8696 Ext. 1478
> Mobile: +1 613 808 4984
> www.pythian.com
>
> --
>
>
>
>
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=272487151&iu=/4140
_______________________________________________
Fish-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fish-users

Reply via email to