YAC linking Problem [SOLVED]

bruce.labitt at autoliv.com bruce.labitt at autoliv.com
Mon May 10 12:09:52 EDT 2010


gnhlug-discuss-bounces at mail.gnhlug.org wrote on 05/10/2010 11:15:28 AM:

> gnhlug-discuss-bounces at mail.gnhlug.org wrote on 05/10/2010 10:21:50 AM:
> 
> > Fellow list members, I've got a linux linking problem, which has me 
> > stumped.  Since I've been coding mostly in python, lately, my 'C' 
brain 
> > has atrophied...
> > 
> > I've got a C (umm actually C++) program that won't link to some ATLAS 
> > libraries which I recently compiled.  The program itself will compile, 

> > link and run if I link to the baseline (non-optimized) ATLAS 
libraries. 
> I 
> > think it even gives the expected result, as an added bonus!
> > 
> > However, if I use "/usr/local/atlas/include/cblas.h" instead of the 
> system 
> > "/usr/include/cblas.h" in the code snippet below,
> > 
> > extern "C"{
> > #include "/usr/local/atlas/include/cblas.h"
> > }
> > 
> > the build reports:
> > $ ./build_cblas_test
> > Building cblas1
> > /tmp/ccSMmtzW.o: In function `main':
> > cbas_tb.cpp:(.text+0x899): undefined reference to `cblas_zgemm'
> > collect2: ld returned 1 exit status
> > Build complete
> > 
> > My build file --> not a make file yet because it is just a one liner, 
> is:
> > 
> > g++ -O3 -m64 -I/usr/local/atlas/include -L/usr/local/atlas/lib -lcblas 

> -lm 
> > -Wall -Wcast-qual -o cblas1 cblas_tb.cpp
> > 

[SOLVED] g++ -O3 -m64 -I/usr/local/atlas/include -lm -Wall -Wcast-qual -o 
cblas1 cblas_tb.cpp /usr/local/atlas/libcblas.a 
/usr/local/atlas/libatlas.a

Many thanks to the anonymous list member who pointed me in the right 
direction!

Who knew C was such an ugly language?  Discuss :P

-Bruce

******************************
Neither the footer nor anything else in this E-mail is intended to or constitutes an <br>electronic signature and/or legally binding agreement in the absence of an <br>express statement or Autoliv policy and/or procedure to the contrary.<br>This E-mail and any attachments hereto are Autoliv property and may contain legally <br>privileged, confidential and/or proprietary information.<br>The recipient of this E-mail is prohibited from distributing, copying, forwarding or in any way <br>disseminating any material contained within this E-mail without prior written <br>permission from the author. If you receive this E-mail in error, please <br>immediately notify the author and delete this E-mail.  Autoliv disclaims all <br>responsibility and liability for the consequences of any person who fails to <br>abide by the terms herein. <br>
******************************



More information about the gnhlug-discuss mailing list