<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">I am new to cmake and have a question that I hope has a simple answer. I am building a simple C++ program that uses blas scopy. I am using<div><br></div><div>find_package(BLAS REQUIRED)</div><div><br></div><div>to find blas on the system (OSX in this case), and the cmake step seems to find it, but when I go to the make step I get the </div><div><div>Undefined symbols:</div><div> "_scopy_", referenced from:</div><div> _main in blas_ex.cpp.o</div></div><div><br></div><div>I usually can fix this with the -fleading-underscore or -fnoleading-underscore or -Dadd_... but I am not really sure what is going on in the cmake build or the Makefile that cmake creates. I don't see any .o files to nm on either. So my question is what is the best way to deal with underscore issues in cmake? Does anyone have a simple example for using cmake to build a c++ program with blas or lapack.</div><div><br></div><div>Thanks</div><div><br><div apple-content-edited="true"> <div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><span class="Apple-style-span" style="font-family: Helvetica, sans-serif; font-size: 12px; ">Jack Chessa</span></div><div><div><div><div><div><div><div><div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Associate Professor<o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Department of Mechanical Engineering<o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">University of Texas at El Paso<o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Email:<span class="apple-tab-span"> </span><a href="mailto:jfchessa@utep.edu" style="color: blue; text-decoration: underline; ">jfchessa@utep.edu</a><o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Office:<span class="apple-tab-span"> </span>A309<o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Voice:<span class="apple-tab-span"> </span>(915) 747-6900<o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Fax:<span class="apple-tab-span"> </span>(915) 747-5019<o:p></o:p></span></div></div><div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><span style="font-size: 9pt; font-family: Helvetica, sans-serif; color: black; ">Web:<span class="apple-tab-span"> </span><a href="http://utminers.utep.edu/jfchessa/index.html" style="color: blue; text-decoration: underline; ">http://utminers.utep.edu/jfchessa/index.html</a><o:p></o:p></span></div></div></div></div></div></div></div></div></div><div style="margin-top: 0in; margin-right: 0in; margin-bottom: 0.0001pt; margin-left: 0in; font-size: 12pt; font-family: 'Times New Roman', serif; "><o:p> </o:p></div></div></div><div><br></div></div><br class="Apple-interchange-newline"> </div><br></div></body></html>