Igor🇺🇦
GCC is good
Not the version that comes with Dev C++.
Nameful
Which version is it at?
Nameful
Ah oke, what IDE do i have to use?
IDE and compiler are separate
Chernykh
Ah oke, what IDE do i have to use?
IDE is integrated development environment, compiler is a thing which do a binary file from ur code
Chernykh
Any IDE u like
Chernykh
I use Clion
Nameful
What compiler does CLion use on Windows?
Chernykh
Which u set
Chernykh
On windows i use MSVC because it's compatible with vcpkg
Chernykh
But Clion isn't free
Nameful
But Clion isn't free
Unless you're a student
Chernykh
U also can use Visual Studio but imho this is pos
Chernykh
Visual Studio code as variant or Sublime text (or if u hardcore - vim)
Chernykh
And if u wanna develop GUI use QtCreator
Chernykh
With Qt lib
Nameful
U also can use Visual Studio but imho this is pos
It has some nice features but it's quite buggy at times
Chernykh
Buggy is the most little problem
Pasolino 🛰
I'm using this code: #include <graphics.h> #include <conio.h> #define readimagefile #define writeimagefile using namespace std; int main() { initwindow(1920,1080,"Test"); writeimagefile("Test.jpg",0,0,1920,1080); getch(); } Can someone explaine because i obtain this?
Pasolino 🛰
Chernykh
> #define readimagefile > #define writeimagefile What?
Pasolino 🛰
> #define readimagefile > #define writeimagefile What?
If i don't use this define it gives me an error saying: main.cpp:(.text+0x82): undefined reference to 'writeimagefile'
Anonymous
What the fuck
Chernykh
Seems like magic... I don't understand, give me a moment
Pasolino 🛰
Yeah but where are their definitions
I have found this part of code on internet. I'm trying to load an image on the WindowsBGI but it doesn't work
Chernykh
I haven't this header. What library is it?
Pasolino 🛰
Chernykh
So, stop
Chernykh
What is u purpose
Anonymous
Sounds to me like you haven't linked the file correctly
Pasolino 🛰
What is u purpose
Displaying an image on the WindowsBGI
Chernykh
Use Qt if it's possible)))
Pasolino 🛰
Anonymous
What do i have to do?
You have included the relevant header you must then actually provide the library function. This is probably what you haven't done
Chernykh
What error r u getting if there ain't defines?
Pasolino 🛰
What error r u getting if there ain't defines?
main.cpp:(.text+0x82): undefined reference to `writeimagefile'
Chernykh
And what builder for project do u use
Chernykh
If u use dll provide to ur builder path to one
Pasolino 🛰
Yeah, it's linker problem
I'm using this -static-libgcc
Chernykh
MSVC with VS?
Anonymous
I'm using this -static-libgcc
You should do -l(library name) like for SDL2 you do -lSDL2
Chernykh
It's sampler to use it
Anonymous
Ok, so the code is correct?
Yes, probably. Just remove the defines you don't need them.
Pasolino 🛰
Yes, probably. Just remove the defines you don't need them.
Ok...how can i add the part that you sayed?
Anonymous
Ok...how can i add the part that you sayed?
Now that I don't use an IDE nor code on Windows I don't really know. But try adding the lib here Options -> Linker -> Libraries
Anonymous
https://www.cs.colorado.edu/~main/cs1300/doc/bgi/bgi.html here it says 5. When you create an executable (exe) program that uses the winbgim library, you must add the six options -lbgi -lgdi32 -lcomdlg32 -luuid -loleaut32 -lole32 (in that order)
Anonymous
If that's the library that you're using try those
gallo
Hi can someone tell me what am I doing wrong? I have to initialize x with c if x is char, if it is not I have to initialize it with c ^ m, but so it signals the error that I cannot convert from char * to char
Francisco
https://pastebin.com/Qp7HUJrj
There's a lot of info missing, so I cannot reproduce your example
Francisco
Try to write minimal example that reproduces your error
Francisco
And if possible, craft that example in a way that we can compile it ourselves
Kenny
Hey, i need to implement a method that receive an integer, and i must print an X. Exemple: n = 5 void printX(int n) { } Output: X X X X X X X X X
Kenny
Somebody can help me?
klimi
whats the problem?
Kenny
Oh
Kenny
I miss the - 1 on if condition
Kenny
Thanks man, <3
Shivanshu
klimi
what a nice spoonfeeding
Johnny
Guys
Johnny
vector [x] .erase() leaves a blank space, how do you remove it?
klimi
call it just vector.erase? idk...
Pasolino 🛰
What does this error means? undefined reference to 'readimagefile'
Francisco
What does this error means? undefined reference to 'readimagefile'
A linker error. The linker isn't able to find the implementation of readimagefile. You either forgot to link some external library or add a specific file to the compilation process
Pasolino 🛰
A linker error. The linker isn't able to find the implementation of readimagefile. You either forgot to link some external library or add a specific file to the compilation process
I've tried to add: #define readimagefile and the programm starts, but on the WindowsBGI screen there isn't any image
Francisco
Send the code here, don't pm me please
Dima
lol
Francisco
Yeah, it's not the first time some random person pms me