I'm using Windows
I just needed to download and install CB, and everything worked fine.
strange that it works in Windows but not in Linux,
how did you set up the project in codeblocks? I did like this:
1. clicked "Create a new project"
2. selected "Static library"
3. choosed the name "shared_lib" in trunk/source/
4. pressed Finish in the next screen (debug and release checked and Compiler was set to "GNU GCC Compiler")
5. Add files recursively trunk/source/shared_lib/ (both include/ and sources/)
6. unchecking macosx and win32 in Multiple selection dialog but not sure there's any difference by that
7. checked both Debug and Release
8. Removed the "main.c" that codeblocks autogenerated
if I try to Build now, CB complains about #include "BMPReader.h" in BMPReader.cpp
like it can't find BMPReader.h because it is not in the same folder as BMPReader.cpp?
if I add include/graphics/ in Build options - Search directories tab, is complains on next h-file #include "platform_util.h" etc
so I had to add all of the include/ folders (I guess I should have given up here already since there is no
way to select all in one operation so I have to do the Add one folder at a time....)
Should I have set something in Build options.. or Properties... (or codeblocks Settings) ?
I am using Code::Blocks 8.02
I have tried adding some #defines I found
__linux__
STREFLOP_SSE
LIBM_COMPILING_FLT32
X11_AVAILABLE
HAVE_SYS_IOCTL_H
perhaps there some more I should add?
maybe I should have pasted the errormessages here:
-------------- Build: Release in shared_lib ---------------
Compiling: sources/graphics/BMPReader.cpp
In file included from /usr/include/c++/4.4/bits/postypes.h:42,
from /usr/include/c++/4.4/bits/char_traits.h:42,
from /usr/include/c++/4.4/string:42,
from include/platform/sdl/platform_util.h:14,
from include/graphics/FileReader.h:15,
from include/graphics/BMPReader.h:19,
from sources/graphics/BMPReader.cpp:12:
/usr/include/c++/4.4/cwchar:67: error: ‘::mbstate_t’ has not been declared
/usr/include/c++/4.4/cwchar:141: error: ‘::wint_t’ has not been declared
/usr/include/c++/4.4/cwchar:143: error: ‘::btowc’ has not been declared
/usr/include/c++/4.4/cwchar:144: error: ‘::fgetwc’ has not been declared
/usr/include/c++/4.4/cwchar:145: error: ‘::fgetws’ has not been declared
/usr/include/c++/4.4/cwchar:146: error: ‘::fputwc’ has not been declared
/usr/include/c++/4.4/cwchar:147: error: ‘::fputws’ has not been declared
/usr/include/c++/4.4/cwchar:148: error: ‘::fwide’ has not been declared
/usr/include/c++/4.4/cwchar:149: error: ‘::fwprintf’ has not been declared
/usr/include/c++/4.4/cwchar:150: error: ‘::fwscanf’ has not been declared
/usr/include/c++/4.4/cwchar:151: error: ‘::getwc’ has not been declared
/usr/include/c++/4.4/cwchar:152: error: ‘::getwchar’ has not been declared
/usr/include/c++/4.4/cwchar:153: error: ‘::mbrlen’ has not been declared
/usr/include/c++/4.4/cwchar:154: error: ‘::mbrtowc’ has not been declared
/usr/include/c++/4.4/cwchar:155: error: ‘::mbsinit’ has not been declared
/usr/include/c++/4.4/cwchar:156: error: ‘::mbsrtowcs’ has not been declared
/usr/include/c++/4.4/cwchar:157: error: ‘::putwc’ has not been declared
/usr/include/c++/4.4/cwchar:158: error: ‘::putwchar’ has not been declared
/usr/include/c++/4.4/cwchar:159: error: ‘::swprintf’ has not been declared
/usr/include/c++/4.4/cwchar:160: error: ‘::swscanf’ has not been declared
/usr/include/c++/4.4/cwchar:161: error: ‘::ungetwc’ has not been declared
/usr/include/c++/4.4/cwchar:162: error: ‘::vfwprintf’ has not been declared
/usr/include/c++/4.4/cwchar:164: error: ‘::vfwscanf’ has not been declared
/usr/include/c++/4.4/cwchar:166: error: ‘::vswprintf’ has not been declared
/usr/include/c++/4.4/cwchar:168: error: ‘::vswscanf’ has not been declared
/usr/include/c++/4.4/cwchar:170: error: ‘::vwprintf’ has not been declared
/usr/include/c++/4.4/cwchar:172: error: ‘::vwscanf’ has not been declared
/usr/include/c++/4.4/cwchar:174: error: ‘::wcrtomb’ has not been declared
/usr/include/c++/4.4/cwchar:175: error: ‘::wcscat’ has not been declared
/usr/include/c++/4.4/cwchar:176: error: ‘::wcscmp’ has not been declared
/usr/include/c++/4.4/cwchar:177: error: ‘::wcscoll’ has not been declared
/usr/include/c++/4.4/cwchar:178: error: ‘::wcscpy’ has not been declared
/usr/include/c++/4.4/cwchar:179: error: ‘::wcscspn’ has not been declared
/usr/include/c++/4.4/cwchar:180: error: ‘::wcsftime’ has not been declared
/usr/include/c++/4.4/cwchar:181: error: ‘::wcslen’ has not been declared
/usr/include/c++/4.4/cwchar:182: error: ‘::wcsncat’ has not been declared
/usr/include/c++/4.4/cwchar:183: error: ‘::wcsncmp’ has not been declared
/usr/include/c++/4.4/cwchar:184: error: ‘::wcsncpy’ has not been declared
/usr/include/c++/4.4/cwchar:185: error: ‘::wcsrtombs’ has not been declared
/usr/include/c++/4.4/cwchar:186: error: ‘::wcsspn’ has not been declared
/usr/include/c++/4.4/cwchar:187: error: ‘::wcstod’ has not been declared
/usr/include/c++/4.4/cwchar:189: error: ‘::wcstof’ has not been declared
/usr/include/c++/4.4/cwchar:191: error: ‘::wcstok’ has not been declared
/usr/include/c++/4.4/cwchar:192: error: ‘::wcstol’ has not been declared
/usr/include/c++/4.4/cwchar:193: error: ‘::wcstoul’ has not been declared
/usr/include/c++/4.4/cwchar:194: error: ‘::wcsxfrm’ has not been declared
/usr/include/c++/4.4/cwchar:195: error: ‘::wctob’ has not been declared
/usr/include/c++/4.4/cwchar:196: error: ‘::wmemcmp’ has not been declared
/usr/include/c++/4.4/cwchar:197: error: ‘::wmemcpy’ has not been declared
/usr/include/c++/4.4/cwchar:198: error: ‘::wmemmove’ has not been declared
Process terminated with status 1 (0 minutes, 5 seconds)
50 errors, 0 warnings