How to generate .exe suffix under Cygwin only

View: New views
6 Messages — Rating Filter:   Alert me  

How to generate .exe suffix under Cygwin only

by kokot-san :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

I have a small project that I am porting from Linux to Windows with Cygwin. Now I want to generate a .exe suffix for my executable only if it is compiled under Cygwin. When I build under Linux, it should not generate any suffix. How should I do this? Below my Jamfile I have so far.

Thank you,
Andrej


project : requirements
  <os>CYGWIN:<define>_WIN32_WINNT=0x0501
  <os>CYGWIN:<library-path>/usr/local/lib
  ;

exe cap2net
  : [ glob *.cpp ]
  /site-config//boost_regex
  /site-config//boost_serialization
  /site-config//boost_date_time
  : <link>static
  : <define>BOOST_REGEX_RECURSIVE
  ;

install $(INSTALL_PATH)/bin : cap2net ;


     
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: How to generate .exe suffix under Cygwin only

by Vladimir Prus-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Andrej van der Zee wrote:

>
> Hi,
>
> I have a small project that I am porting from Linux to Windows with Cygwin. Now I want to generate
> a .exe suffix for my executable only if it is compiled under Cygwin. When I build under Linux, it
> should not generate any suffix. How should I do this?

Use SVN HEAD of Boost.Build, or nightly build.

- Volodya


_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Parent Message unknown Re: How to generate .exe suffix under Cygwin only

by kokot-san :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hi,

>
> Use SVN HEAD of Boost.Build, or nightly build.
>

Thanks!

I tried the nightly build. I successfully build bjam for toolset msvc and I am able to compile the examples (after copying bjam to my PATH). But, when I compile my own sources, I get the following error:

$ bjam --version
Unable to load Boost.Build: could not find build system.
---------------------------------------------------------
C:\cygwin\home\Andrej\mbrace\trunk\boost-build.jam attempted to load the build system by invoking

   'boost-build /usr/local/src/boost-build ;'

but we were unable to find "bootstrap.jam" in the specified directory
or in BOOST_BUILD_PATH (searching /usr/local/src/boost-build).

Please consult the documentation at 'http://www.boost.org'.

I have a boost-build.jam file in the root directory of my project with the single line as suggested in the documentation:

$ cat ../../boost-build.jam
boost-build /usr/local/src/boost-build ;

$ ls /usr/local/src/boost-build
boost-build.jam  boost.png  boost_build.png  bootstrap.jam  build  build-system.jam  contrib  debian  doc  example  hacking.txt  index.html  jam_src  kernel  notes  options  site-config.jam  test  timestamp.txt  tools  user-config.jam  util

What am I doing wrong???

Thank you,
Andrej



     
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: How to generate .exe suffix under Cygwin only

by Vladimir Prus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wednesday 10 June 2009 Andrej van der Zee wrote:

>
> Hi,
>
> >
> > Use SVN HEAD of Boost.Build, or nightly build.
> >
>
> Thanks!
>
> I tried the nightly build. I successfully build bjam for toolset msvc
....
> $ ls /usr/local/src/boost-build
> boost-build.jam  boost.png  boost_build.png  bootstrap.jam  build  build-system.jam  contrib  debian  doc  example  hacking.txt  index.html  jam_src  kernel  notes  options  site-config.jam  test  timestamp.txt  tools  user-config.jam  util
>
> What am I doing wrong???

You are compiling bjam with msvc. Naturally, msvc runtime has no idea about paths suchs as /usr/local.
You need to compile bjam in cygwin shell using gcc.

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Parent Message unknown Re: How to generate .exe suffix under Cygwin only

by kokot-san :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


It indeed creates .exe binaries now. Hopefully this new version of boost-build will be added to the Boost tree soon.  

Thanks!
Andrej



     
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Re: How to generate .exe suffix under Cygwin only

by Vladimir Prus :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thursday 11 June 2009 Andrej van der Zee wrote:

>
> It indeed creates .exe binaries now. Hopefully this new version of boost-build will be added to the Boost tree soon.

What is "Boost tree"? This version is in SVN HEAD of Boost, and will be part of 1.40 release.

- Volodya
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build