Closed ghost closed 6 years ago
Hrm... You need to add zlib.h to headers path as well, of course.
Fixed with this tutorial of adding SDL2 (similar work): FRENCH: http://www.supinfo.com/articles/single/649-comment-installer-sdl-20-codeblocks-windows TODO: Change this SDL2 (in tutorial) to last version, the version 2.0.3 is bugged !
Sorry but now after fixed all import i get:
You should not compile headers, they must be included implicitly through their corresponding .c files.
Need to compile lib manual ? Not already compiled ? But this error is with FMV. Need to include fmv to compile & linker ?
You did include bitstream.h
as a source file in your project, didn't you? You should include it only as a header, not as a source.
I cant test it now, thanks for help, if i have other problem when compile i reopen it.
but look: i have bitstream.h in header but not source.
src updated: added include to bytestream.h
@TeslaRus Thanks.
@TokyoSU If that's the case then why it's in the tab for compiled sources in that screenshot with error message? First of all you might have it both as a source and a header and this isn't visible in the screenshot. And the source files which include bitstream.h
compile just fine. There is no reason why it should be compiled separately.
Thanks TeslaRus is fixed but now i have:
EDIT: the opentomb-code.cbp is terribly old (missing file) and i import all (add file recursively) and selected OpenTomb folder.
should be p->eof instead ->eof
Yet again: you should not compile bytestream.h
. TeslaRus just fixed some cosmetic issue which presently should not affect any real case. Your error seemingly stem from compiling bytestream.h
separately. Please, check that it isn't included in sources section of the project. Better yet don't create Code::Blocks project file manually, try CMake instead, which is a preferred way.
in file option (bytestream.h) uncheck "compilable" or something like that P.S. I use Netbeans IDE
@TokyoSU BTW, the code in the above screenshot doesn't match the code in repository. Are you sure that you didn't change it accidentally?
@TeslaRus Netbeans is more compatible ?
@vvs- The folder of opentomb have already a code-block project, i just used it, but is terribly old. i removed bytestream.h of headers, and with TeslaRus have fixed the "->" EDIT: i have just regrouped in 1 line.
That explains it. This obsolete project file should be removed from repository, then.
i have added basic lib with command: and include & lib: i have missed a library ? now i have this error:
EDIT: The SDL2 library is x32 or x64 ?
yep C::B project files should be deleted... they are very old Netbeans works good for me (debug works fine) + it works on MSW and Linux (C::B crashes under Linux)
need to have linux now or just use netbeans ? i can have linux with windows but if i can have ng and opentomb opened is good too xD
@TeslaRus README.MD need to be updated because lua is implemented not a library EDIT: OpenAL are only .lib not .a
@TeslaRus You have C/C++ version or All ?
@TokyoSU All your problems come from the missing SDL2. That'd explain everything above.
but if you look: SDL2 is here
GCC uses only .a libs; .lib for MS Visual Studio
EDIT: not fixed T.T
@TeslaRus i see but OpenAL have only .lib
SDL2 is here but on compile have:
You should have all libraries compiled by a compatible compiler.
Especially C++ use a non-standard ABI.
SDL2: https://www.libsdl.org/download-2.0.php ZLIB: http://gnuwin32.sourceforge.net/packages/zlib.htm PNG: http://gnuwin32.sourceforge.net/packages/libpng.htm
and all other is included with Code::Blocks WinGW compiler
EDIT: linker option is good ?: -lmingw32 -lpthread -lSDL2main -lSDL2.dll -lz
windows is very problematic ...
PS: @TeslaRus is possible to add sdl2, png, zlib directly to project like lua ?
All libraries obtained separately from the compiler are not guaranteed to be built by the same compatible version.
And including all libraries in-tree will ruin its compilation and distribution under different OSes.
when i add libz.a or zlib.lib in linked library and compile the project i have an error: zlib.h is missing.
i dont know, all file work fine but not zlib. Image 1 with Error: Image2 with File Left (updated last version):
how to fix the zlib not found ? PS: i download the zlib file here (developer): http://gnuwin32.sourceforge.net/packages/zlib.htm