Comeau (working *.bat file)

A

Axter

Sorry for OT question, but does any one have a working *.bat file to
get Comeau to work with VC++ 7.1, VC++ 8.0, or GNU 3.x compilers.

I've tried everything I can think off, to get it to work, and I get
compile errors.
I'm currently using the following *.bat file
http://axter.com/complr.bat

With the following simple hello world source code:
http://axter.com/helloworld.cpp

I keep getting compile errors associated with libcomo, which is the STL
library that is recommended to be used with Comeau.
Example:
"L:\Compiler\Comeau\libcomo\stl_config.h", line 723: catastrophic
error: could
not open source file "math.h"
#include <math.h>

I can get rid of the above compile error if I change the last line in
the bat file to the following:
como.exe -w --vc71 -I"%VC7_ROOT%\INCLUDE" /O2 /FD /EHsc /ML /GS /W0 /c
/Wp64 /Zi /TP C:\helloworld.cpp

However, I then get the following error:
************************************************************************
Failure while executing 'cl' compiler ...email Comeau for advice.
************************************************************************

When I emailed Comeau support, I was told I should remove the VC7
include. Which of course just seems to make things worse.

I'm hoping someone else has a working *.bat file that I could use to
get Comeau working.

Thanks

FYI: (For the topic policy, there is no Comeau NG that I'm aware of,
and Comeau Support has failed to reply to my last two emails)
 
B

Bronek Kozicki

Axter said:
Sorry for OT question, but does any one have a working *.bat file to
get Comeau to work with VC++ 7.1, VC++ 8.0, or GNU 3.x compilers.

8< --- como.cmd --- 8<

@echo off

rem MSVC71 part (no MFC nor ATL stuff)
set PATH=C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\IDE;C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\BIN;C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools;C:\Program Files\Microsoft Visual Studio .NET
2003\Common7\Tools\bin;%PATH%

set INCLUDE=C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\INCLUDE;C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\PlatformSDK\include

set LIB=C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\LIB;C:\Program Files\Microsoft Visual Studio .NET
2003\VC7\PlatformSDK\lib

rem Como part
set COMO_MS_INCLUDE=C:\PROGRA~1\MICROS~2.NET\VC7\INCLUDE
set COMPILER=--vc71
set PATH=C:\DEVEL\Como433\bin;%PATH%
if "%1"=="" goto done
como.exe %*
exit /b %ERRORLEVEL%
:done
8 --- como.cmd --- >8

You will probably need to fix wrapped lines above


B.
 
B

Bronek Kozicki

Bronek Kozicki said:
done


You will probably need to fix wrapped lines above

.... and replace "> done" with ":done". OE-qotefix "fixed" colon when I
was sending above


B.
 
G

Greg Comeau

Sorry for OT question, but does any one have a working *.bat file to
get Comeau to work with VC++ 7.1, VC++ 8.0, or GNU 3.x compilers.

I've tried everything I can think off, to get it to work, and I get
compile errors.
I'm currently using the following *.bat file
http://axter.com/complr.bat

With the following simple hello world source code:
http://axter.com/helloworld.cpp

I keep getting compile errors associated with libcomo, which is the STL
library that is recommended to be used with Comeau.
Example:
"L:\Compiler\Comeau\libcomo\stl_config.h", line 723: catastrophic
error: could
not open source file "math.h"
#include <math.h>

I can get rid of the above compile error if I change the last line in
the bat file to the following:
como.exe -w --vc71 -I"%VC7_ROOT%\INCLUDE" /O2 /FD /EHsc /ML /GS /W0 /c
/Wp64 /Zi /TP C:\helloworld.cpp

However, I then get the following error:
************************************************************************
Failure while executing 'cl' compiler ...email Comeau for advice.
************************************************************************

When I emailed Comeau support, I was told I should remove the VC7
include. Which of course just seems to make things worse.

I'm hoping someone else has a working *.bat file that I could use to
get Comeau working.

Thanks

FYI: (For the topic policy, there is no Comeau NG that I'm aware of,
and Comeau Support has failed to reply to my last two emails)

We give examplary email support, so as much as possible I would
suggest using that over other choices.

We have sent you email now to 4 different paths. Are we going
into your spam?

As to your problem, it is not picking up the 7.1 includes.

As to your question, see bullet #10 of
http://www.comeaucomputing.com/4.3.0/minor/win95+/como433.html
where VC++ 7.1 environment variables are discussed.
Now doubt your settings will be different because you installed
things in different places. In any event, you can (probably should)
be using vcvars32 to setup VC++ 7.1 completely, but itself,
and make sure it can compile a test program. Tne just add
Comeau's bin to your PATH, and 7.1's include directory to
COMO_MS_INCLUDE.

Generally speaking we respond to emails from instantaneously to in
a few hours 7 days a week 24 hours. Also, if we do not respond in 24
hours it probably something has gone wrong with the communication paths
in some manner. Anyway, our support channels should be used over
the NGs.
 
A

Axter

Bronek said:
... and replace "> done" with ":done". OE-qotefix "fixed" colon when I
was sending above


B.

Thanks Bronek.
Seems that there was an email problem, and I was not getting Comeau's
response.
With their help, and with a little testing, I found the problem, and a
good working *.bat script.

In my command line, I was using /c and /TP.
The /TP does not work, which is the option that tells the VC++ compiler
to compile as C++ code.
I believe this doesn't work because Comeau compiles using a C-Compiler
as the front-end.
Also the /c option tells the VC++ compiler not to link, so this also
shouldn't be used.


If anyone else runs into the same problem, here's the working script:
echo off
Rem Change the following three variables to point to your paths
set MYCOMONPATH=L:\Compiler\Comeau
set MYVC7BASEPATH=C:\Program Files\Microsoft Visual Studio .NET 2003
set FrameworkDir=C:\WINNT\Microsoft.NET\Framework

set Drive=%~d1%
Rem Change current drive and directory path
cd /d %Drive%

set PATH=%MYCOMONPATH%\bin;%PATH%
set COMO_MS_INCLUDE=%MYVC7BASEPATH%\vc7\include
set DevEnvDir=%MYVC7BASEPATH%\Common7\IDE
set FrameworkSDKDir=%MYVC7BASEPATH%\SDK\v1.1
set FrameworkVersion=v1.1.4322
set
INCLUDE=%MYVC7BASEPATH%\VC7\ATLMFC\INCLUDE;%MYVC7BASEPATH%\VC7\INCLUDE;%MYVC7BASEPATH%\VC7\PlatformSDK\include\prerelease;%MYVC7BASEPATH%\VC7\PlatformSDK\include;%MYVC7BASEPATH%\SDK\v1.1\include;
set
LIB=%MYVC7BASEPATH%\VC7\ATLMFC\LIB;%MYVC7BASEPATH%\VC7\LIB;%MYVC7BASEPATH%\VC7\PlatformSDK\lib\prerelease;%MYVC7BASEPATH%\VC7\PlatformSDK\lib;%MYVC7BASEPATH%\SDK\v1.1\lib;
set MSVCDir=%MYVC7BASEPATH%\VC7
set
Path=%MYVC7BASEPATH%\Common7\IDE;%MYVC7BASEPATH%\VC7\BIN;%MYVC7BASEPATH%\Common7\Tools;%MYVC7BASEPATH%\Common7\Tools\bin\prerelease;%MYVC7BASEPATH%\Common7\Tools\bin;%MYVC7BASEPATH%\SDK\v1.1\bin;%FrameworkDir%\v1.1.4322;%PATH%
set VCINSTALLDIR=%MYVC7BASEPATH%
set VS71COMNTOOLS="%MYVC7BASEPATH%\include\..\..\common7\tools\"
set VSINSTALLDIR=%MYVC7BASEPATH%\Common7\IDE

rem For VC++, DO NOT use /c or /TP command line options
como.exe --vc71 /O2 /FD /EHsc /ML /GS /W0 /Wp64 /Zi %1 %2 %3 %4 %5 %6
%7 %8 %9
echo "Done!!!!"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top