[CINT] Problem making DLL using CINT

View: New views
3 Messages — Rating Filter:   Alert me  

[CINT] Problem making DLL using CINT

by Sundeep Prakash :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Some parts of this message have been removed. Learn more about Nabble's security policy.
Dear All,

Pls. see the attached header file (Template.h) and TemplateErrorLog.txt file
for the error messages when trying to build DLL using CINT.
The header file and the error log file are self explanatory.

I executed following command to generate makefile
"C:\cint>makecint -mk Templatemake -dl Template.dll -H Template.h"

Pls. let me know what exactly is the problem and most importantly
solution/workaround  to the fix  problem, so that I can build the DLL.

Pls. help...

Regards,
Sundeep


#include <stdio.h>

template<class _Key,class _T>
class CList
{
public:
        class node
        {
                private:
                node *left;
                node *right;
                void* p;//pointer for storing address of string key

                public:
                _Key key;
                _T t;
                friend class CList<_Key,_T>;
        };

        node *root;
        int count;

        /* temporal variables */
        _Key currentKey;
        node *current;

        int m_refCount;
        int m_internalrefCount;

public:

        /* typedef */
        typedef typename CList::node _It;

        /* structure */

        typedef struct {
                _Key key;
                _T t;
        } value_type;

        /* Constructor & Destructor */

        CList();
        virtual ~CList();

        CList& operator[] (const _Key &key);
        _It*& operator = (const _T& t);

};



template<class _Key,class _T>
class CQueue: public CList<_Key,_T>
{
private:
        _T currentValue;
public:
        _T* pop()
        {

                return ¤tValue;
        };
        _Key push(_T &data)
        {
                _Key key;
                return key;
        };

};

class ABC
{
        public:
        typedef struct {
                long lParam1;
                long lParam2;
                long lParam3;
                long lParam4;
        } XYZ;


        private:
        typedef CQueue<int,XYZ> QUEUE;
        QUEUE m_Queue;
};

C:\cint>make -f Templatemake

Error: class,struct,union or type constABC not defined  template.h(53)
Error: Symbol XYZ is not defined in current scope  template.h(53)
Error: Symbol t is not defined in current scope  template.h(53)
!!!Removing G__cpp_Template.cxx G__cpp_Template.h !!!
make: *** [G__cpp_Template.cxx] Error 1

Re: [CINT] Problem making DLL using CINT

by Axel Naumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

this is a funny parser bug. We'll fix this when the major overhaul of
CINT that we're currently working on is done. Until then, please do

  typedef typename CList::node* _PIt;
  _PIt& operator= (const _T& t);

Cheers, Axel.

Sundeep Prakash wrote:

>
> Dear All,
>
> Pls. see the attached header file (Template.h) and TemplateErrorLog.txt
> file
> for the error messages when trying to build DLL using CINT.
> The header file and the error log file are self explanatory.
>
> I executed following command to generate makefile
> "C:\cint>makecint -mk Templatemake -dl Template.dll -H Template.h"
>
> Pls. let me know what exactly is the problem and most importantly
> solution/workaround  to the fix  problem, so that I can build the DLL.
>
> Pls. help...
>
> Regards,
> Sundeep
>
>
> ------------------------------------------------------------------------
>
> #include <stdio.h>
>
> template<class _Key,class _T>
> class CList
> {
> public:
> class node
> {
> private:
> node *left;
> node *right;
> void* p;//pointer for storing address of string key
>
> public:
> _Key key;
> _T t;
> friend class CList<_Key,_T>;
> };
>
> node *root;
> int count;
>
> /* temporal variables */
> _Key currentKey;
> node *current;
>
> int m_refCount;
> int m_internalrefCount;
>
> public:
>
> /* typedef */
> typedef typename CList::node _It;
>
> /* structure */
>
> typedef struct {
> _Key key;
> _T t;
> } value_type;
>
> /* Constructor & Destructor */
>
> CList();
> virtual ~CList();
>
> CList& operator[] (const _Key &key);
> _It*& operator = (const _T& t);
>
> };
>
>
>
> template<class _Key,class _T>
> class CQueue: public CList<_Key,_T>
> {
> private:
> _T currentValue;
> public:
> _T* pop()
> {
>
> return ¤tValue;
> };
> _Key push(_T &data)
> {
> _Key key;
> return key;
> };
>
> };
>
> class ABC
> {
> public:
> typedef struct {
> long lParam1;
> long lParam2;
> long lParam3;
> long lParam4;
> } XYZ;
>
>
> private:
> typedef CQueue<int,XYZ> QUEUE;
> QUEUE m_Queue;
> };
>
>
> ------------------------------------------------------------------------
>
> C:\cint>make -f Templatemake
>
> Error: class,struct,union or type constABC not defined  template.h(53)
> Error: Symbol XYZ is not defined in current scope  template.h(53)
> Error: Symbol t is not defined in current scope  template.h(53)
> !!!Removing G__cpp_Template.cxx G__cpp_Template.h !!!
> make: *** [G__cpp_Template.cxx] Error 1


Re: Problem making DLL using CINT

by Axel Naumann :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Sundeep,

FYI, this has since been fixed.

Cheers, Axel.

On 2006-11-16 15:57, Axel Naumann wrote:

> Hi,
>
> this is a funny parser bug. We'll fix this when the major overhaul of
> CINT that we're currently working on is done. Until then, please do
>
>   typedef typename CList::node* _PIt;
>   _PIt& operator= (const _T& t);
>
> Cheers, Axel.
>
> Sundeep Prakash wrote:
>> Dear All,
>>
>> Pls. see the attached header file (Template.h) and TemplateErrorLog.txt
>> file
>> for the error messages when trying to build DLL using CINT.
>> The header file and the error log file are self explanatory.
>>
>> I executed following command to generate makefile
>> "C:\cint>makecint -mk Templatemake -dl Template.dll -H Template.h"
>>
>> Pls. let me know what exactly is the problem and most importantly
>> solution/workaround  to the fix  problem, so that I can build the DLL.
>>
>> Pls. help...
>>
>> Regards,
>> Sundeep
>>
>>
>> ------------------------------------------------------------------------
>>
>> #include <stdio.h>
>>
>> template<class _Key,class _T>
>> class CList
>> {
>> public:
>> class node
>> {
>> private:
>> node *left;
>> node *right;
>> void* p;//pointer for storing address of string key
>>
>> public:
>> _Key key;
>> _T t;
>> friend class CList<_Key,_T>;
>> };
>>
>> node *root;
>> int count;
>>
>> /* temporal variables */
>> _Key currentKey;
>> node *current;
>>
>> int m_refCount;
>> int m_internalrefCount;
>>
>> public:
>>
>> /* typedef */
>> typedef typename CList::node _It;
>>
>> /* structure */
>>
>> typedef struct {
>> _Key key;
>> _T t;
>> } value_type;
>>
>> /* Constructor & Destructor */
>>
>> CList();
>> virtual ~CList();
>>
>> CList& operator[] (const _Key &key);
>> _It*& operator = (const _T& t);
>>
>> };
>>
>>
>>
>> template<class _Key,class _T>
>> class CQueue: public CList<_Key,_T>
>> {
>> private:
>> _T currentValue;
>> public:
>> _T* pop()
>> {
>>
>> return ¤tValue;
>> };
>> _Key push(_T &data)
>> {
>> _Key key;
>> return key;
>> };
>>
>> };
>>
>> class ABC
>> {
>> public:
>> typedef struct {
>> long lParam1;
>> long lParam2;
>> long lParam3;
>> long lParam4;
>> } XYZ;
>>
>>
>> private:
>> typedef CQueue<int,XYZ> QUEUE;
>> QUEUE m_Queue;
>> };
>>
>>
>> ------------------------------------------------------------------------
>>
>> C:\cint>make -f Templatemake
>>
>> Error: class,struct,union or type constABC not defined  template.h(53)
>> Error: Symbol XYZ is not defined in current scope  template.h(53)
>> Error: Symbol t is not defined in current scope  template.h(53)
>> !!!Removing G__cpp_Template.cxx G__cpp_Template.h !!!
>> make: *** [G__cpp_Template.cxx] Error 1
>
>

LightInTheBox - Buy quality products at wholesale price