I have a project running written in CBuilder XE. In the code i use the following:
#include <queue.h>
Trying to compile it in the new compiler i get the following error message:
[bcc32 Error] cdrv.hpp(5): E2209 Unable to open include file 'queue.h'
Full parser context
POS_PRNT.CPP(7): #include cpos.hpp
cpos.hpp(5): #include cdrv.hpp
Searching the include directory (and sub directories....) i didn't find queue.h.
How should i change this line ?
Thanks
Ofer
Migrating from CBuilder XE to Cbuilder 10.4
Moderator: 2ffat
Re: Migrating from CBuilder XE to Cbuilder 10.4
What are you trying to use from <queue.h> exactly? If you are trying to use the standard std::queue class, you need to include <queue> instead (drop the .h suffix).
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software
Re: Migrating from CBuilder XE to Cbuilder 10.4
After dropping the .h I tried to compiled it. On the line below:
typedef queue< PcPosRec > MsgQueue;
i got the following error:
[bcc32 Error] cdrv.hpp(53): E2257 , expected
What does it means and how can I correct it ?
Thanks
Ofer
typedef queue< PcPosRec > MsgQueue;
i got the following error:
[bcc32 Error] cdrv.hpp(53): E2257 , expected
What does it means and how can I correct it ?
Thanks
Ofer
Re: Migrating from CBuilder XE to Cbuilder 10.4
If there is no preceding 'using namespace std;' or 'using std::queue;' statement, you will need to fully qualify the class name:
Code: Select all
typedef std::queue< PcPosRec > MsgQueue;
Code: Select all
#include <queue>
using namespace std;
typedef queue< PcPosRec > MsgQueue;
Code: Select all
#include <queue>
using std::queue;
typedef queue< PcPosRec > MsgQueue;
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software
Re: Migrating from CBuilder XE to Cbuilder 10.4
Hi,
I added the using (first example) and it compiled OK.
Now the link failed on the following statement:
if ((pPOS->idCHValThred = _beginthread(CHValidate, 0x2000, pValPrm)) == -1)
CritErr("Can't create CHVal thread");
The error is:
[ilink32 Error] Error: Unresolved external '__beginthread' referenced from C:\CPP\POS\DOR\TEMP\DDAFUNC.OBJ
looking at the help it is written:
/* Use the -tWM (32-bit multi-threaded target) command-line switch for this example */
Where should i add this switch ?
Thanks
Ofer
I added the using (first example) and it compiled OK.
Now the link failed on the following statement:
if ((pPOS->idCHValThred = _beginthread(CHValidate, 0x2000, pValPrm)) == -1)
CritErr("Can't create CHVal thread");
The error is:
[ilink32 Error] Error: Unresolved external '__beginthread' referenced from C:\CPP\POS\DOR\TEMP\DDAFUNC.OBJ
looking at the help it is written:
/* Use the -tWM (32-bit multi-threaded target) command-line switch for this example */
Where should i add this switch ?
Thanks
Ofer
Re: Migrating from CBuilder XE to Cbuilder 10.4
I don't see a checkbox/toggle for that switch in the Project Options, so you will have to manually add the switch to the IDE's command-line for the compiler. There should be an option somewhere to specify additional user-defined command-line options (sorry, I'm not in front of an IDE that I can look at right now).
Remy Lebeau (TeamB)
Lebeau Software
Lebeau Software