Sabotender
New Coder
I am completely unaccustomed to using windows as the operating system environment because I have barely… Unique… Preferences when it comes to writing code.
Here is how I set up my coding environment under Debian Linux:
Sudo apt-get install...
build-essential
codeblocks
SDL2
SDL2-image
SDL2-mixer
ncurses
libchipmunk0d3
And here is how I set up the Compiler build environment for Codeblocks running on Debian Linux:
Compiler Settings
COMPILER FLAGS
Enable Extra Compiler Warnings: ticked
Stop Compiling after first Error: ticked
LINKER SETTINGS
Link libraries
ncurses
menu
panel
chipmunk
SDL2
SDL2_mixer
SDL2 ttf
SDL2 image
SEARCH DIRECTORIES
compiler
/usr/include/SDL2
/usr/include/GLES2
/usr/include/EGL
/usr/include/GL/usr/include/chipmunk
Linker
/usr/lib/i386-linux-gnu
Under windows, here's the steps I have taken to set up the under the same/similar development environment, as best as I could:
I downloaded the MingW64 compiler from here:
Specifically from the quote, taken from their site, 'GCC 13.1.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 16.0.5 + MinGW-w64 11.0.0 (UCRT) - release 5 (LATEST)'
I downloaded the SDL2 Library here:
SDL2-Image Library here:
github.com
SDL2-mixer here:
github.com
Chipmunk Physics library version 6.1x here:
github.com
for all of those libraries, I downloaded specifically the 'win32-x86' variety. I am not certain those were the correct ones, I assumed it was because of the version of Mingww that I downloaded, to match.
And here is how I set up the Compiler build environment for Codeblocks running on Microsoft Windows:
COMPILER FLAGS
Enable Extra Compiler Warnings: ticked
Stop Compiling after first Error: ticked
LINKER SETTINGS
Link libraries
SDL2
SDL2_mixer
SDL2_image
C:\Users\Sabotender\Documents\C Source\chipmunk\bin\Release\libchipmunk.a
SEARCH DIRECTORIES
compiler
C:\mingw64\include\SDL2
C:\Users\Sabotender\Documents\C Source\chipmunk\include\chipmunk
Linker
C:\mingw64\bin
I created a new Console project under Codeblocks because I couldn't build for the first time without one, where I could easily under the Linux version 😕
I received no build warnings or errors for the SDL2 library, which I installed via Google research, which included dropping the dlls in the Mingww64 bin directory, and the header files in the appropriate directory, but the primary source of my woes is practically the heart of my project that I've been unable to access, is that Chipmunk library!
You may noticed tat I linked that chipmunk library which ends in an a, but I have no idea whether or not it is correct. I really REALLY hate building other people's code. I only really use precompiled binaries set for the Operating system that I am currently using at that time. based on some research I performed via Google, I created a new CodeBlocks static library project,opened the chipmunk.c code, linked the headers, changed the build target to 'Release', and it built successfully, or so I thought, because when I then tried plugging in this information in my own project, immediately I received 53 Build errors, for which are a few examples I have pasted below:
C:\mingw64\include\chipmunk\cpShape.h|169|undefined reference to `cpBodyActivate'|
another:
C:\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\13.1.0\..\..\..\..\x86_64-w64-mingw32\bin\ld.exe: C:\Users\Sabotender\Documents\C Source\Yet Another 2D Game\main.c|2166|undefined reference to `cpSpaceRemoveShape'|
And another, for posterity:
C:\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\13.1.0\..\..\..\..\x86_64-w64-mingw32\bin\ld.exe: C:\Users\Sabotender\Documents\C SourceYet Another 2D Game\main.c|10750|undefined reference to `cpBodyApplyImpulse'|
I have spent several days trying to resolve this issue. I am not entirely certain where I am making the mistake. It might be because I built the library incorrectly,, but it's probably because I am not linking the library correctly. It could be something else, sorry for cherry-picking.
...
I was able to work on my project without problems, for a very very long time, but due to unforeseen circumstances, I am no longer able to use Linux for writing code. I remember several years ago trying to set up this project initially under Windows, and it was every bit as difficult getting things set up, because, unlike working with Linux, one cannot simply 'apt-get install' and everything that you need is automagically installed in the directories that it they are supposed to, and not needing to fiddle with things like environment variables and whatnot.
I chose using CodeBlocks for writing code and working on my project, because I prefer to keep things simple and not working with silly things like make files, or anything at the command line, because I very much prefer to keep out of the CLI as much as I can.
I actually sought help on numerous Discord servers, and even on IRC (thanks a lot, libera), and the first comment I received was, 'WHY are you using something like CodeBlocks,WHY aren't you useing Microsoft Visual Studio?!?!?!?!'
I don't think I should find the need to explain myself each and every time I decide to use something that is not popular. It is very exhausting.
I know that I am ranting, I'm just tired and frustrated. 😵
With all that have been said, I discovered this Forum, and I noticed, to my extreme delight and surprise, that there were previous threads that matched 'CodeBlocks'! I registered immediately, and I have high hope to possibly find someone with experience using CodeBlocks and/or can see where I am making this horrible mistake with the Chipmunk library,and can reach a positive solution.
Thank you so very much for reading my thread, and I hope I provided thorough documentation regarding My goals.
Here is how I set up my coding environment under Debian Linux:
Sudo apt-get install...
build-essential
codeblocks
SDL2
SDL2-image
SDL2-mixer
ncurses
libchipmunk0d3
And here is how I set up the Compiler build environment for Codeblocks running on Debian Linux:
Compiler Settings
COMPILER FLAGS
Enable Extra Compiler Warnings: ticked
Stop Compiling after first Error: ticked
LINKER SETTINGS
Link libraries
ncurses
menu
panel
chipmunk
SDL2
SDL2_mixer
SDL2 ttf
SDL2 image
SEARCH DIRECTORIES
compiler
/usr/include/SDL2
/usr/include/GLES2
/usr/include/EGL
/usr/include/GL/usr/include/chipmunk
Linker
/usr/lib/i386-linux-gnu
Under windows, here's the steps I have taken to set up the under the same/similar development environment, as best as I could:
I downloaded the MingW64 compiler from here:
WinLibs - GCC+MinGW-w64 compiler for Windows
WinLibs - MinGW-w64 personal build = GCC for Windows 32-bit and 64-bit - Coming soon: the largest collection of open source libraries ported to Windows using MinGW-w64 and MSYS2.
winlibs.com
Specifically from the quote, taken from their site, 'GCC 13.1.0 (with POSIX threads) + LLVM/Clang/LLD/LLDB 16.0.5 + MinGW-w64 11.0.0 (UCRT) - release 5 (LATEST)'
I downloaded the SDL2 Library here:
SDL2-Image Library here:
Releases · libsdl-org/SDL_image
Image decoding for many popular formats for Simple Directmedia Layer. - libsdl-org/SDL_image
SDL2-mixer here:
Releases · libsdl-org/SDL_mixer
An audio mixer that supports various file formats for Simple Directmedia Layer. - libsdl-org/SDL_mixer
Chipmunk Physics library version 6.1x here:
GitHub - slembcke/Chipmunk2D at 6.1.x
A fast and lightweight 2D game physics library. Contribute to slembcke/Chipmunk2D development by creating an account on GitHub.
for all of those libraries, I downloaded specifically the 'win32-x86' variety. I am not certain those were the correct ones, I assumed it was because of the version of Mingww that I downloaded, to match.
And here is how I set up the Compiler build environment for Codeblocks running on Microsoft Windows:
COMPILER FLAGS
Enable Extra Compiler Warnings: ticked
Stop Compiling after first Error: ticked
LINKER SETTINGS
Link libraries
SDL2
SDL2_mixer
SDL2_image
C:\Users\Sabotender\Documents\C Source\chipmunk\bin\Release\libchipmunk.a
SEARCH DIRECTORIES
compiler
C:\mingw64\include\SDL2
C:\Users\Sabotender\Documents\C Source\chipmunk\include\chipmunk
Linker
C:\mingw64\bin
I created a new Console project under Codeblocks because I couldn't build for the first time without one, where I could easily under the Linux version 😕
I received no build warnings or errors for the SDL2 library, which I installed via Google research, which included dropping the dlls in the Mingww64 bin directory, and the header files in the appropriate directory, but the primary source of my woes is practically the heart of my project that I've been unable to access, is that Chipmunk library!
You may noticed tat I linked that chipmunk library which ends in an a, but I have no idea whether or not it is correct. I really REALLY hate building other people's code. I only really use precompiled binaries set for the Operating system that I am currently using at that time. based on some research I performed via Google, I created a new CodeBlocks static library project,opened the chipmunk.c code, linked the headers, changed the build target to 'Release', and it built successfully, or so I thought, because when I then tried plugging in this information in my own project, immediately I received 53 Build errors, for which are a few examples I have pasted below:
C:\mingw64\include\chipmunk\cpShape.h|169|undefined reference to `cpBodyActivate'|
another:
C:\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\13.1.0\..\..\..\..\x86_64-w64-mingw32\bin\ld.exe: C:\Users\Sabotender\Documents\C Source\Yet Another 2D Game\main.c|2166|undefined reference to `cpSpaceRemoveShape'|
And another, for posterity:
C:\mingw64\bin\..\lib\gcc\x86_64-w64-mingw32\13.1.0\..\..\..\..\x86_64-w64-mingw32\bin\ld.exe: C:\Users\Sabotender\Documents\C SourceYet Another 2D Game\main.c|10750|undefined reference to `cpBodyApplyImpulse'|
I have spent several days trying to resolve this issue. I am not entirely certain where I am making the mistake. It might be because I built the library incorrectly,, but it's probably because I am not linking the library correctly. It could be something else, sorry for cherry-picking.
...
I was able to work on my project without problems, for a very very long time, but due to unforeseen circumstances, I am no longer able to use Linux for writing code. I remember several years ago trying to set up this project initially under Windows, and it was every bit as difficult getting things set up, because, unlike working with Linux, one cannot simply 'apt-get install' and everything that you need is automagically installed in the directories that it they are supposed to, and not needing to fiddle with things like environment variables and whatnot.
I chose using CodeBlocks for writing code and working on my project, because I prefer to keep things simple and not working with silly things like make files, or anything at the command line, because I very much prefer to keep out of the CLI as much as I can.
I actually sought help on numerous Discord servers, and even on IRC (thanks a lot, libera), and the first comment I received was, 'WHY are you using something like CodeBlocks,WHY aren't you useing Microsoft Visual Studio?!?!?!?!'
I don't think I should find the need to explain myself each and every time I decide to use something that is not popular. It is very exhausting.
I know that I am ranting, I'm just tired and frustrated. 😵
With all that have been said, I discovered this Forum, and I noticed, to my extreme delight and surprise, that there were previous threads that matched 'CodeBlocks'! I registered immediately, and I have high hope to possibly find someone with experience using CodeBlocks and/or can see where I am making this horrible mistake with the Chipmunk library,and can reach a positive solution.
Thank you so very much for reading my thread, and I hope I provided thorough documentation regarding My goals.