User forums > General (but related to Code::Blocks)
Anyone with OpenWatcom experience ?
killerbot:
I downloaded and installed OpenWatcom 1.3, I did not set the environment. Don't want the environment to be poluted with the include from open watcom, etc ...
Since I want to have most of my code, for that code that is platform independent, to compile with a whole bunch of compilers (all of them should be error/warning free), I added the open watcom.
Created a new project with cb (hello world), changed the compiler to open watcom, but oh boy, a whole lot of errors.
Anyone out there who can help me on this ??
Muchos gracias,
Lieven
PerryWerneck:
Hi,
First of all: Sorry for my bad english. :)
Well, I'm an open watcom user but, right now, my use of codeblocks is just for editing; for compiling I use my own Makefiles but I can try to help you. With kind of errors are you getting?
By the way: My first idea about the problem is the environmental variables. The watcom installer creates a "setvar.bat" file. You can read it to get some glues about how to set the environment under codeblocks (problably the includes path is missiing).
killerbot:
I think the includes are ok.
C:\watcom\H;
C:\watcom\H\NT
This is the code :
//#include <iostream>
int main()
{
//std::cout << "Hello world!" << std::endl;
return 0;
}
There are the errors on it :
Project : Rev1447NewProject
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Documents and Settings\ldc\My Documents\CodeBlocks\Rev1447NewProject\
--------------------------------------------------------------------------------
Switching to target: default
Linking console executable: Rev1447NewProject.exe
Open Watcom C/C++32 Compile and Link Utility Version 1.3
Portions Copyright (c) 1988-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
wcc386 .objs\main.o
Open Watcom C32 Optimizing Compiler Version 1.3
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found ''
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found ':'
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ':'
.objs\main.o(1): Error! E1026: Invalid declarator
.objs\main.o(1): Error! E1009: Expecting ';' but found '\'
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Error! E1022: Missing or misspelled data type near 'Documents'
.objs\main.o(1): Error! E1022: Missing or misspelled data type near 'and'
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found '\'
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found '\'
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Error! E1022: Missing or misspelled data type near 'My'
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found '\'
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found '\'
.objs\main.o(1): Error! E1061: Expecting data or function declaration, but found ' '
.objs\main.o(1): Warning! W132: No storage class or type specified
.objs\main.o(1): Error! E1009: Expecting ';' but found '\'
.objs\main.o(1): Error! E1147: Too many errors: compilation aborted
Error: Compiler returned a bad status compiling '.objs\main.o'
Process terminated with status 1 (0 minutes, 0 seconds)
21 errors, 7 warnings
Any idea ?
Lieven
MortenMacFly:
--- Quote from: killerbot on December 06, 2005, 12:45:13 pm ---.objs\main.o(1): Error! E1022: Missing or misspelled data type near 'Documents'
.objs\main.o(1): Error! E1022: Missing or misspelled data type near 'and'
--- End quote ---
Seems the compiler has issues with the spaces in your path name. Try creating/compiling the project in a pth that does NOT contain spaces.
Morten.
killerbot:
Ok, I think I have have found the cause of the problem.
The jury finds guilty :
1)Open Watcom for some stupid error
2)CodeBlocks for a minor bug
My environment :
- Windows XP
- watcom installed at E:\watcom
- NO setvars run, and I did not let the installer add those stuff automatically to the environment (no polution please)
As described above building 'the hello world' from CB fails.
The project resides in a subdir of "My Documents", so lots of spaces in the path (seems that this is NOT the problem).
Below I will describe 4 build scenarios, 2 of them work, 2 of them don't.
I opened a console in the directory where the cbp file and the main.cpp is, and .objs subdir already exists.
PreSteps :
extend the path environment variable (just in this console) with E:\watcom\binnt;E:\watcom\binw
add the environment variable : WATCOM=E:\watcom
Scenario 1 :
type in :
wcl386 -c -iE:\watcom\h -iE:\watcom\h\nt -fo=main.obj main.cpp
(note the -fo part can be omitted in this case)
--> compiles ok, time to link
wcl386 -LE:\watcom\lib main.obj -fe=test.exe
--> links ok, and the program even does what it is suppose to do ;-)
Scenario 2 :
wcl386 -c -iE:\watcom\h -iE:\watcom\h\nt -fo=main.o main.cpp
--> compiles ok, time to link
wcl386 -LE:\watcom\lib main.o -fe=test.exe
=============================> ALL THOSE ERRORS !!!!
seems it does not like the .o extension ??
Scenario 3 :
wcl386 -c -iE:\watcom\h -iE:\watcom\h\nt -fo=.objs\main.obj main.cpp
--> compiles ok, time to link
wcl386 -LE:\watcom\lib .objs\main.obj -fe=test.exe
--> links ok, and the program even does what it is suppose to do ;-)
Scenario 4 : (the way CodeBlocks does it)
wcl386 -c -iE:\watcom\h -iE:\watcom\h\nt -fo=.objs\main.o main.cpp
--> compiles ok, time to link
wcl386 -LE:\watcom\lib .objs\main.o -fe=test.exe
=============================> ALL THOSE ERRORS !!!!
seems it does not like the .o extension ??
Conclusion :
It does not like those .o extension, don't ask me why, I have no idea. But that's why we find open Watcom guilty as charged.
Now onto the CB bug :
Well let's have CB use the extension .obj for this compiler and not .o .
What might be a good place to look : Compiler Settings : OpenWatcom : Other-> Advanced options (not for sissies !!) -> Others, well well look at that :
it is already specified to use obj !!!!!!
But Cb does not use that extension, so that's the Cb bug.
Yiannis, could you please fix this one ?
Cheers,
Lieven
Navigation
[0] Message Index
[#] Next page
Go to full version