𝖜𝖎𝖑𝖑𝖘𝖎𝖗
i did that too
V01D
It needs to be an ARRAY of char * Not a single char * which would be one singe string
V01D
i did that too
You switched argc and argv too. First argc, then argv
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
same error occurs only in manjaro
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
Use arch
it works in arch
Anonymous
it works in arch
Then use it
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
Then use it
i wanted to know the reason
Vlad
int main() <- i did this too
Try this: int main(int argc, char *argv[], char *envp[]);
Vlad
It could be that manjaro is bullshitting you
Anonymous
This is implementation specific
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
this problem occurs in SFML only i don't know why
Vlad
I dunno maybe make clean
V01D
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
V01D
i did this too
Get a bootable drive with debian on it and nuke manjaro because it gave you issues and it sucks overall
Mar!o
Get a bootable drive with debian on it and nuke manjaro because it gave you issues and it sucks overall
Weird that Manjoar made problems - Manjaro never made problems to me..
Mar!o
U sure the issue it with Manjaro?
V01D
U sure the issue it with Manjaro?
Yeah, he tried it on other arch distros
V01D
I prefer debian
Mar!o
Hmm ok. I think Manjaro is a a good, fast and modern distro.
Mar!o
I prefer debian
What advantages does debian have?
V01D
I have to do a little more research at times in manjaro
Mar!o
Dev packages.
That's all? I don't know Debian so I try to understand why it might be better :)
V01D
That's all? I don't know Debian so I try to understand why it might be better :)
Well I use manjaro off of a live USB, bc my HDD is corrupted. Installing all those packages from the internet is a little time consuming after each reboot.
V01D
And yeah, manjaro isn't all too bad, but I prefer the apt package manager in debian. It's just what I know, I cannot deal with pacman errors (cuz I am too lazy)
Mar!o
Yeah I also prefer apt. I just know the commands better and I'm used to write sudo apt whatever..
Mar!o
I should look at Debian maybe. I'm looking for new distros for my new PC...
Vlad
i did this too
look into what _start in the stdlib is calling
Vlad
And if you can objdump your .o files and look if main is there.
V01D
Yeah I also prefer apt. I just know the commands better and I'm used to write sudo apt whatever..
The super long pacman command led me to alias get='sudo pacman -S --no-confirm ' vs apt install <pkg> -y
V01D
I mean you could write the alias to .bashrc, but still. The absence of dev packages sucks. Manjaro is kind of anti opensource contributor with all its special needs.
Andrew
i think maybe this error
Andrew
i think maybe this error
cause -o stand for output , like that you are specifying your bin/main to be your output
Andrew
wnile main.o should be output
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
U sure the issue it with Manjaro?
i don't think its manjaro problem since it work on manjaro xfce
Asdew
You people are guessing too much.
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
wnile main.o should be output
i already manually compile too compilation is fine problem is at linking phase
Andrew
undefined reference to main is not a linkin problem
Asdew
When you compiled obj/main.o, did you use -c?
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
Asdew
Send the command and output when you compile obj/main.o.
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
same code same makefile works on other
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
undefined reference to main is not a linkin problem
https://www.csee.umbc.edu/courses/undergraduate/202/fall04/Projects/CommonErrors.shtml
Asdew
Show your src/main.c.
Asdew
Oh, sorry.
Andrew
https://www.csee.umbc.edu/courses/undergraduate/202/fall04/Projects/CommonErrors.shtml
to main, cause you already have main..when is undefined reference to something else it may be linkin problem
Ammar
yes i already tried others
If you want to use the arguments, it should have been: int main(int argc, char *argv[]);
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
I am reading SFML for my computer graphics course. would you like to suggest your experience about computer graphics anyone??
Andrew
what os you using ?
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
arch
Andrew
if you already have the library installed just try
V01D
i think maybe this error
Now I know. Add the -c flag for object files
Andrew
arch
if you already installed the library , is simple just do <g++ yourmain -lsfml-graphics -lsfml-window -lsfml-system>
Andrew
no need to link any objects
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
Ammar
Now I know. Add the -c flag for object files
That seem to be linking rather than compiling relocateable object.
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
try run this , where yourmain is your main path, and see result
i think you haven't read my previous message
V01D
i think you haven't read my previous message
Just try to compile main to an obj file manually. g++ src/main.cpp -c -o main.o g++ main.o <linker options> -o bin/main
Ammar
Could you objdump -d the main.o and see there is <main>: or not.
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
g++ src/main.cpp -c -o main.o this works
𝖜𝖎𝖑𝖑𝖘𝖎𝖗
but get error on linking phase