[Coin-discuss] Additional linker options

Yan Xu Yan.Xu at sas.com
Thu Jan 11 14:23:44 EST 2007


Lou,

I am using Linux. If not link with my additional library, I can configure/compile/test project COPS. 

I looked at the BuildTool project:

https://projects.coin-or.org/BuildTools/wiki/user-configure#ConfigDotSiteFile

and could not found LDFLAGS or ADD_LDFLAGS defined in the list of "Variable Arguments for configure". Probably, it is the reason why it failed.
 
What I want is some hook similiar with ADD_CXXFLAGS so that I can link additional library. I can add a hook at COPS level since I am one of the maintainers, but I don't know how. I'm still learning the new build system.

thanks,

Yan 

-----Original Message-----
From: coin-discuss-bounces at list.coin-or.org [mailto:coin-discuss-bounces at list.coin-or.org] On Behalf Of Lou Hafer
Sent: Thursday, January 11, 2007 12:04 PM
To: coin-discuss at list.coin-or.org
Subject: RE: [Coin-discuss] Additional linker options

Yan,

	The error you're seeing (`C compiler cannot create executables') is one of the very first tests performed by the configure script --- as the message says, it's checking to see if the compiler can compile and link a trivial program,

int main ()
{ ;
  return 0; }
	
	The command that's used is

$CC $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS

where CC is the name of the C compiler, CPPFLAGS are C preprocessing flags, CFLAGS are C compile flags, LDFLAGS are link flags, LIBS are extra libraries, and ac_ext will be the C source file extension.

You can see where your LDFLAGS definitions are being applied.  Esben's comment that the flags you've given are incorrect for your platform is likely correct, but ...  to say anything intelligent here, you need to take the time to give us a bit more information.  What platform (OS/compiler) are you building on?  What project are you trying to augment?  What does config.log say?  (It will show you the expanded commands, with shell variables expanded.)  Did you check the output of `configure --help=recursive' to see if there are any hooks for project- specific link options?

							Lou

_______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss




More information about the Coin-discuss mailing list