C++ compilin with MinGW and JCom



  • Hi all.

    I've got an problem with C++ and JCom.

    I want to compile an JCom - cpp file with MinGW C/C++ compiler.
    In the first step of compiling i will get an *.obj file which will be after linking an *.dll file

    My Problem is a failure by including the headerfiles.
    here the commandlineerrors.

    ..\jcom\test>C:\mingw\bin\g++ -IC:\j2sdk1.4.2_07\include\ IUnknown.cpp
    In file included from atlbase.h:69,
    from IUnknown.cpp:9:
    atlconv.h: In function OLECHAR* A2WBSTR(const CHAR*, int)': atlconv.h:199: warning: passing NULL used for non-pointer converting 6 ofint MultiByteToWideChar(UINT, DWORD, const CHAR, int, WCHAR, int)'**
    In file included from IUnknown.cpp:9:
    atlbase.h: At global scope:
    atlbase.h:73: warning: malformed '#pragma pack(push[, id], <n>)' - ignored
    atlbase.h:79: warning: `selectany' attribute directive ignored
    ....
    ....

    Maybe anyone could help me?
    Thanks
    Peter



  • Amaphisto schrieb:

    atlconv.h:199: warning: passing NULL used for non-pointer converting 6 of `int MultiByteToWideChar(UINT, DWORD, const CHAR, int, WCHAR, int)'**

    You call MultiByteToWideChar with NULL as parameter 6. But NULL is used with pointers, just write 0.

    Amaphisto schrieb:

    atlbase.h:73: warning: malformed '#pragma pack(push[, id], <n>)' - ignored

    #pragma is compiler specific. Maybe you've got a header file from a different compiler and gcc doesn't know it. If a compiler doesn't recognize a pragma it is ignored. Look at the gcc documentation for more information about the support of '#pragma pack(push[, id], <n>)'.

    Amaphisto schrieb:

    atlbase.h:79: warning: `selectany' attribute directive ignored

    Maybe this could help you.


Anmelden zum Antworten