Nov 14, 2010 at 7:47pm UTC
Hi I use C::B (Code::Blocks) with MinGW
when I put struct in HPP file I have error:
||can't open file `LVGROUP': No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|
LVGROUP is a struct
any structure doesn't work??
if I save in file.H everything is ok - why??
I use hpp for classes?
Please help and good luck
Nov 14, 2010 at 8:00pm UTC
The file extension is part of the file name.
If the file is named 'LVGROUP.hpp', then #include "LVGROUP"
won't work. You need to do #include "LVGROUP.hpp"
Nov 14, 2010 at 8:11pm UTC
But the struct is
typedef struct LVGROUP {
UINT cbSize;
UINT mask;
LPWSTR pszHeader;
int cchHeader;
LPWSTR pszFooter;
int cchFooter;
int iGroupId;
UINT stateMask;
UINT state;
UINT uAlign;
} LVGROUP, *PLVGROUP;
in myheader.hpp
Why error is on struct
Nov 14, 2010 at 8:30pm UTC
for the include line, it doesn't matter what the struct is named. You #include the header file, not the struct.
If the file is "myheader.hpp", then you #include "myheader.hpp"
Nov 14, 2010 at 8:50pm UTC
yes I include #include "myheader.hpp"
but I got an error from log
||can't open file `LVGROUP': No such file or directory|
||=== Build finished: 1 errors, 0 warnings ===|
LVGROUP is struct in myheader.hpp and compiler throw error about strucy, what is the problem??
I change myheader.hpp to myheader.h and everything is OK no errors
Last edited on Nov 14, 2010 at 8:50pm UTC
Nov 14, 2010 at 9:19pm UTC
Code::Blocks 10.05 with GNU Compiller 32 bit -= MinGW libraries