CPW & Borland 5.0

This maybe a known problem or simply something dumb I did…

But I can’t seem to compile my cpw project, it doesn’t even go past the include <cpw.h>

the first error I get is :
#error cpw_config.h isnt configured correctly. (gl headers)

I use the basiccpw template and installed everything like stated in setup.txt

the first error I get is :
#error cpw_config.h isnt configured correctly. (gl headers)

Hey,

Thats a message from the cpw_config.h file telling you that define’s are “missing”. For win32, the config file uses the compile define WIN32 to identify the win32 platform. Most likely this isn’t defined so a bunch of important stuff isn’t getting setup correctly. Check to make sure cpw_config.h is getting processed for your build environment (Borland). And, if you figure out what’s wrong, please let me know so I can make the appropriate changes.

Odd’s are Borland doesn’t define WIN32, it defines something like _WIN32 or similar.

Regards,
Jim

You where right, Borland does define _WIN32 instead of WIN32…

But when I extended my testing I found that visualC++ defines both, WIN32 && _WIN32

So it might be better to use
#ifdef _WIN32’ instead of ‘#ifdef WIN32’

But the borland misery doesn’t stop there…

Now including cpw.h generates alot more error messages, most inside stdlib.h !

[C++ Error] stdlib.h(434): E2132 Templates and overloaded operators cannot have C linkage
[C++ Error] stdlib.h(434): E2040 Declaration terminated incorrectly
[C++ Error] stdlib.h(505): E2316 ‘_argc’ is not a member of ‘std’
[C++ Error] stdlib.h(505): E2272 Identifier expected
[C++ Error] stdlib.h(506): E2316 ‘_argv’ is not a member of ‘std’
[C++ Error] stdlib.h(506): E2272 Identifier expected
[C++ Error] stdlib.h(603): E2316 ‘min’ is not a member of ‘std’
[C++ Error] stdlib.h(603): E2272 Identifier expected
[C++ Error] stdlib.h(604): E2316 ‘max’ is not a member of ‘std’
[C++ Error] stdlib.h(604): E2272 Identifier expected
[C++ Error] cpw_config.h(731): E2190 Unexpected }
[C++ Error] CPW.H(26): E2046 Bad file name format in include directive
[C++ Warning] cpw_str.h(358): W8008 Condition is always true
[C++ Warning] cpw_str.h(372): W8008 Condition is always true
[C++ Warning] cpw_str.h(645): W8004 ‘tlen’ is assigned a value that is never used
[C++ Error] cpw_str.h(748): E2268 Call to undefined function ‘_memicmp’
[C++ Error] cpw_str.h(764): E2268 Call to undefined function ‘_memicmp’
[C++ Error] cpw_str.h(780): E2268 Call to undefined function ‘_memicmp’
[C++ Error] cpw_str.h(796): E2268 Call to undefined function ‘_memicmp’
[C++ Error] main.cpp(143): E2040 Declaration terminated incorrectly

I hope the next CPW version will be borland compiliant, I’ve tested it in VisualC++ and it realy does seem very promesing… I realy liked it ! (good API & Featureset)

Oops, I was typing faster than I can think again…

No worry’s about most of the errors in my previous msg…

Your cpw works fine in my VisualC++ && BorlandC++

after I made these adjustments :
changed ‘#ifdef WIN32’ (in cpw_config.h) to
#ifdef _WIN32
changed ‘_memicmp’ (in cpw_str.h) to
memicmp

thanx for the gread library !

MustBMistakin

Here is what glfw.h does:

#if !defined(_WIN32) && (defined(__WIN32__) &#0124; &#0124; defined(WIN32) &#0124; &#0124; defined(__CYGWIN__))
#define _WIN32
#endif // _WIN32

…slightly more portable (of course, _WIN32 and WIN32 should be swapped in cpw, since glfw uses _WIN32 and cpw uses WIN32 internally).

[This message has been edited by marcus256 (edited 03-25-2002).]

Cool… thanks for the touch up info. I’ll add
this to the next release.

Regards,
Jim