Skip to content
Prev 32738 / 63424 Next

using a "third party" DLL in my package

On May 20, 2009, at 4:32 , Seija Sirki? wrote:

            
This is not trivial, and how you do it is compiler dependent. A quick  
fix was provided by Simon Urbanek a while back and it is _not_  
portable, it assumes you are using GCC. It would be nice to have a  
configure file that detects the compiler and optimization setting and  
then re-sets the optimization level. I have thought about writing one,  
but have never got around to do it.

Anyway, the fix is in the Makevars file from affxparser from  
Bioconductor. Essentially, you use a Makevars file placed in the src  
directory, containing

MYCXXFLAGS=-O0 -Wall

%.o: %.cpp
         $(CXX) $(ALL_CPPFLAGS) $(ALL_CXXFLAGS) $(MYCXXFLAGS) -c $< -o  
$@

Essentially this makes sure that -O0 (indicating no optimization) is  
placed at the _end_ of the call to the compiler (this is for C++ files  
btw), using the fact that if you have two -O* settings, the last one  
overrides the first.

This ought to be easily adaptable to FORTRAN.

Kasper