SDL_ttf linking errors Code::Blocks(Windows) - linker

I've followed tutorial from lazyfoo.net how to link SDL_ttf with Code::Blocks(windows), but something is wrong. I get these errors:
C:\SDL_ttf-2.0.11\include\SDL_ttf.h|30|error: SDL.h: No such file or directory|
C:\SDL_ttf-2.0.11\include\SDL_ttf.h|31|error: begin_code.h: No such file or directory|
C:\SDL_ttf-2.0.11\include\SDL_ttf.h|247|error: close_code.h: No such file or directory|
||=== Build finished: 3 errors, 0 warnings ===|
Any ideas?

In SDL_ttf.h change
#include"SDL.h"
#include"begin_code.h"
#include"close_code.h"
to
#include<SDL/SDL.h>
#include<SDL/begin_code.h>
#include<SDL/close_code.h>

Related

"fatal error No such file or directory" in rdlibkafka

I'm new to kafka. I downloaded rdlibkafka from github and try to run producer.c example code
but I give error.
How can I solve it?
Error:
[producer.c 2023-01-19 12:25:31.509]
,,producer.c:8:10: fatal error: rdkafka.h: No such file or directory
8 | #include "rdkafka.h"
| ^~~~~~~~~~~
compilation terminated.
I think the problem is about compiler which cannot find rdlibkafka but I'm sure it is installed.
because header files exist in /usr/include/rdlibkafka

gprbuild fails to include a file needed for gnatcoll

I tried to build something with GnatColl from GPS Community 2021 on Fedora 35. The linker failed, saying
ld: /path/to/common/Ada/Quoter/obj/gnatcoll-refcount.o: in function `gnatcoll__refcount__sync_bool_compare_and_swap':
gnatcoll-refcount.adb:(.text+0x622): undefined reference to `gnatcoll_sync_bool_compare_and_swap_access'
collect2: error: ld returned 1 exit status
This also fails if I try to run the project using gprbuild -P Quoter.gpr.
I can fix this from the command line by copying the failed command (gcc ...) and adding ~/opt/GNAT/2021/include/gnatcoll/gnatcoll_support.c to the list of files to compile, as that's the included file with the desired function. That's awfully inconvenient, though.
I guess I have something configured slightly wrong. Might anyone here have an idea?
I found the answer, and it's a bit embarrassing, but looking in the gnatcoll examples would have done it: add with "gnatcoll"; to the beginning of the gpr file.

Setting up the `regex.h` library on Windows with VS Code

I've been trying to get the regex.h library to work all day, but it's not working. (Here are my VS Code workspace configurations: https://github.com/EnderCommunity/Murmur/tree/main/.vscode - all the compiler info are here)
This is the file that I was trying to get the regex library to work with:
https://github.com/EnderCommunity/Murmur/blob/main/compiler/libraries/regex/reg.h
I tried to include the library normally, but it returns an error:
And I tried to include this library, but it returns some compiling errors:
> Executing task: C/C++: gcc.exe build active file <
Starting build...
"C:\Program Files\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\gcc.exe" -g C:\Users\adels\Desktop\EnderCommunity\Projects\Murmur\compiler\start.c -o C:\Users\adels\Desktop\EnderCommunity\Projects\Murmur\compiler\start.exe
C:\Users\adels\AppData\Local\Temp\ccifSq1r.o: In function `regChk':
C:/Users/adels/Desktop/EnderCommunity/Projects/Murmur/compiler/libraries/regex/reg.h:15: undefined reference to `__imp_regcomp'
C:/Users/adels/Desktop/EnderCommunity/Projects/Murmur/compiler/libraries/regex/reg.h:22: undefined reference to `__imp_regexec'
C:/Users/adels/Desktop/EnderCommunity/Projects/Murmur/compiler/libraries/regex/reg.h:33: undefined reference to `__imp_regerror'
C:/Users/adels/Desktop/EnderCommunity/Projects/Murmur/compiler/libraries/regex/reg.h:40: undefined reference to `__imp_regfree'
collect2.exe: error: ld returned 1 exit status
Build finished with error(s).
The terminal process terminated with exit code: -1.
Terminal will be reused by tasks, press any key to close it.
So the way that I included this library might be wrong! What am I doing wrong here?
Using MSYS2 will fix this, it comes with all the necessary libraries for C.

Error when compling C file using MEX: 'gsl/gsl_types.h' file not found

So I am trying to MEX compile a .c file from the libeemd library (https://bitbucket.org/luukko/libeemd), but when I give it a go, the following error appears
Building with 'Xcode with Clang'.
Error using mex
In file included from /Users/neergaard/Dropbox/Studie/Master/Matlab/library/resources/libeemd/src/eemd.c:19:
In file included from /Users/neergaard/Dropbox/Studie/Master/Matlab/library/resources/libeemd/src/eemd.h:38:
/opt/local/include/gsl/gsl_rng.h:23:10: fatal error: 'gsl/gsl_types.h' file not found
#include <gsl/gsl_types.h>
^
1 error generated.
I am pretty sure that I have the gsl library installed, but how can I make sure that the header files point to the right location?
I am not experienced in this sort of thing, so any help would be greatly appreciated!.

MiniFMOD compilation

I'm starting development, and yet having lots of problems coming out from the moment I 'm trying to go a little bit out of bounds.
I usually work with CodeBlocks and just tried once to compile using MinGW.
I'm just starting to do program with the GTK library, my other programs were console applications.
So I've downloaded MiniFMOD 1.70 and 1.60 on http://www.fmod.org/index.php/download.
When I compile the main.cpp on a C++ console application project
I get this message (for both MiniFMOD versions).
||=== tryfmod170, Debug ===|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\music.h|266|error: redefinition of typedef 'FMUSIC_MODULE'|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\minifmod.h|26|note: previous declaration of 'FMUSIC_MODULE' was here|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\Fmusic.c|117|error: conflicting types for 'FMUSIC_LoadSong'|
C:\Documents and Settings\Vincent\Bureau\minifmod170\lib\minifmod.h|56|note: previous declaration of 'FMUSIC_LoadSong' was here|
||=== Build finished: 2 errors, 0 warnings ===|
I'm sure it is a pretty simple error but I assume I'm quickly getting confused between all the file types,variables,structures and platforms...a
If somebody could help me I would be very grateful
It looks like you are including music.h and minifmod.h both of which have typedefs for FMUSIC_MODULE. I think you just need minifmod.h as it is the interface header, music.h is an internal header.

Resources