Anonymous
while there will be other compiler s which will convert language to IR.
Stephanos
Anonymous
Anonymous
LLVM runs some general optimizations on code in its IL
Anonymous
Anonymous
So it is optimising the intermediate code
Anonymous
And then there's so called backend
Anonymous
Anonymous
I guess LLVM is doing that too
Anonymous
And target platform could be machine code, JavaScript etc
Stephanos
LLVM Core compiles it to binary for the chosen cpu architecture
Anonymous
*converting to machine lang. Typo there.
Stephanos
yeah,... but lets say, @unterumarmung , that this js output is rather hacky and not part of the actual LLVM core, is it
Stephanos
the main goal of LLVM core is to generate code for a CPU
Anonymous
Anonymous
Stephanos
@unterumarmung well, you are correct, that you can compile IR to js, but that is more an "add-on"
Anonymous
My question is that how do I write an opengl program with visual studio code as my code editor
Stephanos
LLVM is huge and i don't think, that there are many people that know what you can do with it as a whole.
Anonymous
My question is that how do I write an opengl program with visual studio code as my code editor
Anonymous
Anonymous
I want to know how to do it
Stephanos
Turbo, at what stage are you facing problems. Could you be more specific, please
Pavel
I want to know how to do it
There's lot of tutorials about opengl in the internet as far as I know.
What problems do you have?
Anonymous
I get a message about undefined reference
Stephanos
okay,... are you using cmake for the build process?
Anonymous
No sir
Anonymous
1. Learn about build systems
2. Learn about compilers on your platform
3. Learn how to use opengl on your platform
4. Open the editor
5. Write some valid code using your knowledge
6. Compile your program
???
Profit
Anonymous
Ok sir
Stephanos
Turbo have you ever build a opengl program in your commandline?
Stephanos
by using compiler options?
Anonymous
No sir
Anonymous
I have used code block
Anonymous
But now I want to use visual studio code
Anonymous
The ui is nice
Stephanos
okay, then i have a task for you, are you ready?
Stephanos
oh wait
Anonymous
Yes sir
Stephanos
on linux, mac or win?
Anonymous
Anything
Anonymous
Windows
Stephanos
oh... okay...
Anonymous
Stephanos
ähm... i have no clue how to compile in commandline on windows :D
Anonymous
Ok give me your ideas on other systems maybe it will help
Stephanos
i'd start, using vim, to write a simple opengl hello world, as stated in online tutorials
Stephanos
then try and compile this one file with g++
Anonymous
No, you just have to learn how to use opengl on windows
Anonymous
Anonymous
The build process is what troubles me
Anonymous
Stephanos
Turbo but you have no clue how the buildsystem works
Anonymous
There is a thing called Visual Studio
Stephanos
@unterumarmung with "vim" i mean.... any kind of bare text-editor
Anonymous
Anonymous
No sir
Anonymous
Why not?
Anonymous
The network in my region is slow
Anonymous
I will take a very long time to download
Anonymous
That is why I don't have it
Anonymous
I think you have to do it
Because there's a lot of tutorials using VS
Anonymous
Anonymous
Ok sir
Anonymous
Thank you
Anonymous
May God bless you
Anonymous
The first option is much easier
Anonymous
Well
Anonymous
Ok
Anonymous
So, wanted to ask
Stephanos
Turbo if you want to compile a glfw3 program, use the compileroptions: -lglfw3 -lGL -lm -lXrandr -lXi -lX11 -lXxf86vm -lpthread
Anonymous
that do all c and cpp compilers use LLVM as their backend
Stephanos
that should do the trick with the undef ref
Stephanos
Anonymous
gcc, g++
Anonymous
clang
Anonymous
Did you ever compile your program using command line, turbo?