Csound Csound-dev Csound-tekno Search About

Re: [Cs-dev] Build error

Date2006-11-23 03:59
FromMichael Gogins
SubjectRe: [Cs-dev] Build error
I always run SCons in the MSys BASH shell. I still have the problem with fltk-config. But I think the problem is simply that my system is not set up for SCons to FIND fltk-config (which does exist on my system). I will try making this available and see what happens. 

Where should the various config scripts go?

Regards,
Mike

-----Original Message-----
>From: David Akbari 
>Sent: Nov 22, 2006 9:40 PM
>To: Developer discussions , Michael Gogins 
>Subject: Re: [Cs-dev] Build error
>
>Hi Mike,
>
>
>On Oct 28, 2006, at 9:11 PM, Michael Gogins wrote:
>
>> scons: done reading SConscript files.
>> scons: Building targets ...
>> fltk-config --compile frontends/cseditor/cseditor.cxx
>> 'fltk-config' is not recognized as an internal or external command,
>> operable program or batch file.
>> scons: building terminated because of errors.
>> scons: *** [cseditor] Error 1
>>
>> The other things that link with FLTK do not use fltk-config on MinGW.
>>
>> Regards,
>> Mike
>
>
>I've looked into this in quite a bit more depth, and the command
>
>> fltk-config --compile frontends/cseditor/cseditor.cxx
>
>DOES work to compile cseditor on Windows (using MinGW) however there is 
>a catch.
>
>Previously I had not realized that when running scons on Windows, a 
>user actually does so in the Windows Command Interpreter, and *not* the 
>MinGW bash shell as on other platforms... the command simply works when 
>run from the root of the Csound source tree but only in the MinGW 
>(MSYS) bash shell. That's the problem, since `fltk-config` is indeed 
>not valid from within the Windows Command Interpreter, but it _is_ 
>valid within the MSYS bash shell; this explains why the command works 
>as expected on Linux and OSX, where the user runs scons within the C 
>shell.
>
>That said, when running the fltk-config command with the --compile 
>switch in the MinGW bash shell, it outputs a compiler line that looks 
>like this:
>
>g++ -I/usr/local/include -I/usr/local/include/FL/images -mwindows 
>-DWIN32 -mno-cygwin -o cseditor frontends/cseditor/cseditor.cxx 
>-mwindows -mno-cygwin -L/usr/local/lib /usr/local/lib/libfltk.a -lole32 
>-luuid -lcomctl32 -lwsock32
>
>Which returns the correctly compiled cseditor.exe file.
>
>My question to you (and other Windows gurus on the list) is; how to get 
>SConstruct to run a compiler line similar to the one above, but to 
>ensure its success across various system configurations? The reason I 
>choose to use the `fltk-config` command is precisely because it 
>generates the proper compiler line depending on how the user has 
>configured their system. Obviously it would be trivial to add the exact 
>line from  above, but I really would like to avoid "cannot find 
>library" critical errors in the event one of those specific libraries 
>is not present!
>
>How can the SConstruct language be used to similarly generate the 
>proper flags based on the commonEnvironment() as defined by SConstruct 
>for Win32 targets?
>
>
>Thanks in advance,
>
>
>-David
>
>
>-------------------------------------------------------------------------
>Take Surveys. Earn Cash. Influence the Future of IT
>Join SourceForge.net's Techsay panel and you'll get the chance to share your
>opinions on IT & business topics through brief surveys - and earn cash
>http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
>_______________________________________________
>Csound-devel mailing list
>Csound-devel@lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/csound-devel




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Csound-devel mailing list
Csound-devel@lists.sourceforge.net