There is some weird bug in the IDE, that I didn't find listed in the archives.
If it is a genuine bug, I don't expect it will be resolved anytime soon, since
DevC++ hasn't been maintained in years.
So, for future reference I'll post what's happening.
I'm porting an existing project (a console app) from LccWin32 (and PellesC),
just for grins.
I spent an entire day trying to figure out why I kept getting a zillion :
"263 C:\Programming\Dev-Cpp\include\windef.h syntax error at '##' token "
type error messages.
After stripping down my project to a bare minimum, (a single file with only a
main() function), I determined it had to be the IDE.
If I attempt to edit (in any way) the project configuration, via Project ->
Project Options...,
somehow, one of the settings in Project.dev gets corrupt so that the project
will fail to compile and produces all those windef.h errors.
In Project.dev, there is a parameter called: "CompilerSettings"
and it normally looks like this: CompilerSettings=
however,
if I edit Project Options, it changes to this:
CompilerSettings=1100000000000000001000
and the project will fail to compile.
If I strip it back to the original form: "CompilerSettings="
then the project will compile without errors.
I have no idea why it's doing that.
Steve
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I have found that I can get rid of the problem (perhaps permanently)
by modifying the file: devcpp.ini,
located in:
"C:\Documents and Settings(my-name)\Local Settings\Application Data"
As shown below, that same pattern of 1's and 0's was present in
parameter: "Options=".
I simply erased that bit pattern and the IDE replaced it with all 0's.
Only linking with the above method works.
And yes, I have read much of the "Read Before Posting" stuff.
Adding library names, as has been illustrated, does not seem to work right.
e.g.: lib/tcconio.a lib/libdyncall_s.a lib/libdynload_s.a lib/libcoldname.a
The above generates "not found" errors, as seen here:
<snip>
Compiler: Default compiler
Building Makefile: "C:\Programming\BxbTutor\Bxbasic\Makefile.win"
Executing make clean
rm -f Dev/bxbasic.o Dev/Bxbasic.exe
gcc.exe -c bxbasic.c -o Dev/bxbasic.o -I"include" -I"C:/Programming/Dev-
Cpp/include"
gcc.exe Dev/bxbasic.o -o "Dev\Bxbasic.exe" -L"C:/Programming/Dev-Cpp/lib"
lib/tcconio.a lib/libdyncall_s.a lib/libdynload_s.a lib/libcoldname.a
gcc.exe: lib/tcconio.a: No such file or directory
gcc.exe: lib/libdyncall_s.a: No such file or directory
gcc.exe: lib/libdynload_s.a: No such file or directory
gcc.exe: lib/libcoldname.a: No such file or directory
make.exe: *** Error 1
Execution terminated
<snip>
Using Dev-C++ 4.9.9.2, on Win-XP.
There is some weird bug in the IDE, that I didn't find listed in the archives.
If it is a genuine bug, I don't expect it will be resolved anytime soon, since
DevC++ hasn't been maintained in years.
So, for future reference I'll post what's happening.
I'm porting an existing project (a console app) from LccWin32 (and PellesC),
just for grins.
I spent an entire day trying to figure out why I kept getting a zillion :
"263 C:\Programming\Dev-Cpp\include\windef.h syntax error at '##' token "
type error messages.
After stripping down my project to a bare minimum, (a single file with only a
main() function), I determined it had to be the IDE.
If I attempt to edit (in any way) the project configuration, via Project ->
Project Options...,
somehow, one of the settings in Project.dev gets corrupt so that the project
will fail to compile and produces all those windef.h errors.
In Project.dev, there is a parameter called: "CompilerSettings"
and it normally looks like this: CompilerSettings=
however,
if I edit Project Options, it changes to this:
CompilerSettings=1100000000000000001000
and the project will fail to compile.
If I strip it back to the original form: "CompilerSettings="
then the project will compile without errors.
I have no idea why it's doing that.
Steve
Hello,
I have found that I can get rid of the problem (perhaps permanently)
by modifying the file: devcpp.ini,
located in:
"C:\Documents and Settings(my-name)\Local Settings\Application Data"
As shown below, that same pattern of 1's and 0's was present in
parameter: "Options=".
I simply erased that bit pattern and the IDE replaced it with all 0's.
<snip>
gcc.exe=gcc.exe
g++.exe=g++.exe
gdb.exe=gdb.exe
make.exe=make.exe
windres.exe=windres.exe
dllwrap.exe=dllwrap.exe
gprof.exe=gprof.exe
Options=0000000000000000000000 <<---HERE
Bins=C:\Programming\Dev-Cpp\Bin
C=include;C:\Programming\Dev-Cpp\include
Cpp=lib\gcc\mingw32\3.4.2\include;include\c++\3.4.2\backward;include\c++\3.4.2
\mingw32;include\c++\3.4.2;include
Lib=C:\Programming\Dev-Cpp\lib
</snip>
Now, it seems to work just fine.
However...,
I have found that linking library files only seems to work if I spell
out the full path to the library file, even tho' it is in the /lib/ directory.
e.g: here is a snip from the makefile:
<snip>
LIBS = -L"C:/Programming/Dev-Cpp/lib" ../../Dev-Cpp/lib/tcconio.a ../../Dev-
Cpp/lib/libdyncall_s.a ../../Dev-Cpp/lib/libdynload_s.a ../../Dev-
Cpp/lib/libcoldname.a
INCS = -I"C:/Programming/Dev-Cpp/include"
CXXINCS = -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward"
-I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include"
</snip>
Only linking with the above method works.
And yes, I have read much of the "Read Before Posting" stuff.
Adding library names, as has been illustrated, does not seem to work right.
e.g.: lib/tcconio.a lib/libdyncall_s.a lib/libdynload_s.a lib/libcoldname.a
The above generates "not found" errors, as seen here:
<snip>
Compiler: Default compiler
Building Makefile: "C:\Programming\BxbTutor\Bxbasic\Makefile.win"
Executing make clean
rm -f Dev/bxbasic.o Dev/Bxbasic.exe
gcc.exe -c bxbasic.c -o Dev/bxbasic.o -I"include" -I"C:/Programming/Dev-
Cpp/include"
gcc.exe Dev/bxbasic.o -o "Dev\Bxbasic.exe" -L"C:/Programming/Dev-Cpp/lib"
lib/tcconio.a lib/libdyncall_s.a lib/libdynload_s.a lib/libcoldname.a
gcc.exe: lib/tcconio.a: No such file or directory
gcc.exe: lib/libdyncall_s.a: No such file or directory
gcc.exe: lib/libdynload_s.a: No such file or directory
gcc.exe: lib/libcoldname.a: No such file or directory
make.exe: *** Error 1
Execution terminated
<snip>
Here is what the makefile looks like:
<snip>
LIBS = -L"C:/Programming/Dev-Cpp/lib" lib/tcconio.a lib/libdyncall_s.a
lib/libdynload_s.a lib/libcoldname.a
INCS = -I"C:/Programming/Dev-Cpp/include"
CXXINCS = -I"lib/gcc/mingw32/3.4.2/include" -I"include/c++/3.4.2/backward"
-I"include/c++/3.4.2/mingw32" -I"include/c++/3.4.2" -I"include"
</snip>
Just for clarity, all four libraries do reside in the "/lib/" directory.
Steve