Conversation
Notices
-
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 11:12:21 JST hazlin no plap pirate Who ever put this here, probably also hates hashtables... -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Thursday, 12-Sep-2024 11:12:20 JST Pleroma-tan @hazlin gonna stick with c for now thank u very much, pretty sure I'll have to learn c++ anyway if i wanna get serious with professional gramming -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Thursday, 12-Sep-2024 11:45:16 JST Pleroma-tan @gentoobro @hazlin man hcreate
probably good enough if you're wanting to perform basic tasks with a hash table
-
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 11:45:17 JST hazlin no plap pirate @gentoobro
Karna had posted this video a day ago. About, some really shitty hashtable that is included.
https://www.youchu.be/watch?v=ShcHZaeDSdY -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 11:45:17 JST gentoobro Also, hash tables should be considered "basic C".
-
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 11:45:18 JST gentoobro Um, I don't get the hash table hate reference?
-
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 11:45:41 JST hazlin no plap pirate @gentoobro
Yeah, I didn't realize, just how much you need to know to write C.
A bit of a wake up call, when I tried to compile a simple C script, and spent like 2 hours trying to figure out how to do anything with a string xD -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Thursday, 12-Sep-2024 11:45:41 JST Pleroma-tan @hazlin @gentoobro what did you want to do with the code -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 11:49:04 JST gentoobro Awkward to use and not typesafe. Also, it only supports string keys. You might consider wrapping it in some macros for typesafety and convenience, but at that point you're not far off from writing your own table anyway.
Pleroma-tan likes this. -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 11:52:53 JST hazlin no plap pirate @kirby @gentoobro
I've been making game prototypes. First in ruby, now a 3d one in godot.
I wanted to remake the ruby one in SFML with the C binding. But, could never get hello world to work xD
Couldn't get the bind to work.
Figured I needed more C basics... learned that C isn't like other languages and there is just going to be a big learning curve to even get started. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 11:52:53 JST gentoobro The learning curve eventually pays off with unmatched performance and high productivity (when macros fully sink in).
Pleroma-tan likes this. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 11:54:49 JST gentoobro A common trap for noobs. "Undefined function" errors are often this.
Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Thursday, 12-Sep-2024 11:54:50 JST Pleroma-tan @hazlin @gentoobro can i take a wild shot in the dark? lol
i bet like, 5 dollah you didn't put in the linker flag. but tbh probably a really stupid guess -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 12:03:34 JST hazlin no plap pirate @kirby @gentoobro
I honestly don't know enough to tell you what is wrong.
The C++ hello world works just fine. But, I have SFML installed at the OS level.
I did spent some time trying to understand what is wrong, but my conclusion is that... I just don't know anything about C lol, and it isn't close enough to what I was used to, to wing it xDPleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Thursday, 12-Sep-2024 12:05:24 JST Pleroma-tan @hazlin @gentoobro OH NO ITS CMAKE IM BLIND AS A BAT OH NO
the sfml includes probably should be wrapped in carrots instead of quotation marks tho, i do carrots for libraries installed throughout the entire system. not sure tho -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 12:07:12 JST hazlin no plap pirate @gentoobro @kirby
It is just one of those, getting started on something that is interesting... but simple enough so that I can actually progress.
Which is what I am doing in most other areas.Pleroma-tan likes this. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 12:10:00 JST gentoobro Looks like the include directory is wrong. See if /usr/include/CSFML-2.2/include is indeed the correct directory, and if it then continues to /usr/include/CSFML-2.2/include/SFML/System.h
I don't know much about cmake, I used autotools in the past then wrote my own build system a few years ago.
Pleroma-tan likes this. -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 12:10:23 JST gentoobro Lol, yeah, totally missed that. This is the problem. @hazlin
Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Thursday, 12-Sep-2024 13:49:28 JST Pleroma-tan @hazlin @gentoobro hm. linker error. linky link time. tell cmake to link using appropriate linker flags, id guess -lsfml for sfml, there's some way to get the proper cflags for linking using pkg-config but i don't remember the method
also to the namespace question: psuedonamespace_funcyfuncfunc(); /* no */ -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 13:49:29 JST hazlin no plap pirate @gentoobro @kirby
My distro doesn't seem to offer a CSFML installer, but the source built, and install put the files in /usr/local/lib.
Looking back at my project file, all the warnings about stuff not being found have disappeared.
Though, not quite to working yet.
main.c:12: undefined reference to `sfRenderWindow_create'
If this were C++, I'd expect to use namespace::function_name. But, is there a C equivalent for name space?
Or does, like #include just drop everything into the context? -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Thursday, 12-Sep-2024 13:49:30 JST hazlin no plap pirate @gentoobro @kirby
So, I build the CSFML lib files from source, for the version of SFML I have installed.
Where do I actually put these files, so everything just works? -
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Thursday, 12-Sep-2024 13:49:30 JST gentoobro sudo make install should put them where they should go, generally. It's better to install the -dev version through your package manager if you can, or just run Gentoo and use the normal package. All of those files will need to be placed in the proper include directory, which is usually something like /usr/include/<package>. The libs will also need to go wherever your distro puts them.
~You need to change your source code includes to be like #include <SFML/System.h>, with the angle brackets not the double quotes. ~ Edit: you already did that.
Double quotes are for 'local' files relative to the source file and angle brackets are for things in the system include path.
-
Embed this notice
gentoobro (gentoobro@shitpost.cloud)'s status on Friday, 13-Sep-2024 13:07:09 JST gentoobro pkg-config --libs gets you the linker flags, and pkg-config --cflags gets you the header include directories and any other flags it might need.
Pleroma-tan likes this. -
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 13-Sep-2024 16:28:51 JST Pleroma-tan @hazlin @gentoobro just do ldd (binary name) my bad it's 2 am
-
Embed this notice
Pleroma-tan (kirby@lab.nyanide.com)'s status on Friday, 13-Sep-2024 16:28:52 JST Pleroma-tan @hazlin @gentoobro ldd the binary? -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Friday, 13-Sep-2024 16:28:53 JST hazlin no plap pirate @gentoobro @kirby it indeed was not on the path. It IS now on the path, but the error still remains when running the compile binary.
"./Hello_SFML: error while loading shared libraries: libcsfml-audio.so.2.5: cannot open shared object file: No such file or directory" -
Embed this notice
hazlin no plap pirate (hazlin@shortstacksran.ch)'s status on Friday, 13-Sep-2024 16:28:53 JST hazlin no plap pirate @gentoobro @kirby even tried putting the library into the same directory as the executable, but that didn't seem to help
-
Embed this notice