nilsberglund-orleans / YouTube-simulations

Code for simulations on YouTube
Creative Commons Zero v1.0 Universal
594 stars 39 forks source link

No such file or directory #9

Open Mirawaraxd opened 5 months ago

Mirawaraxd commented 5 months ago

in VisualCode 2022 have this problems: image when I try to compile, the following error appears in the terminal: image please help

nilsberglund-orleans commented 5 months ago

It looks like you are missing some C libraries, that have to be installed. I have no experience with running C code on windows, however, so I don't know how this is done in your case.

Mirawaraxd commented 5 months ago

I spent all of yesterday trying to figure out the problem (nothing worked), maybe the problem will disappear in the virtual machine, what do you think?

nilsberglund-orleans commented 5 months ago

I don't know. But maybe try this: https://medium.com/swlh/setting-opengl-for-windows-d0b45062caf or similar entries found by searching for "Installing OpenGL on windows". The same applies to other libraries that might be missing.

Mirawaraxd commented 5 months ago

thank you so much for this guide! opengl and glut problem dissapear, but tiffio.h still make error image i found and download sam lefflers library, but i dont know how to install it image in README file i found this commands image i tried to go in this directory with cmd and run them, but nothing work. i am sorry for my clumsiness, i dont a programmer or comething, so thats hard for me

nilsberglund-orleans commented 5 months ago

Perhaps you can find some support from the web site http://www.libtiff.org/

Otherwise, you have the option of commenting the line

include / Sam Leffler's libtiff library. /

as well as functions writetiff, writetiff_new and any reference to them.

You won't be able to save images to make movies, but the rest should work.

Mirawaraxd commented 5 months ago

I solved all the problems with missing files, and even found where to set the launch parameters, but even so, an error appears, if you don’t know how to solve it, then I’d better install a virtual box with Linux and learn how to use it, because all this makes me I feel like Sisyphus, I'm very tired. anyway, thanks for your support image image

nilsberglund-orleans commented 5 months ago

To me it looks like you are using a C++ compiler, while the code is in C. Try another compiler, such as gcc.

Mirawaraxd commented 5 months ago

I changed the compiler, the error has become much shorter, now I can cover it with 1 screenshot, I heard that there are different “standards” of the language, probably this is connected with this? image

nilsberglund-orleans commented 5 months ago

That could be the case, I have never seen this error before though. It almost looks like the compiler considers "far" as a reserved keyword. Perhaps replacing all occurrences of "far" in that function by some other name helps. The question is whether the compiler shows all errors, or if it stops after a given number of errors. You may also try commenting out functions that cause compilation errors, and all references to them - if the function is not essential to the simulation you want to make (this one is only used for sims of the wave equation with collections of circular obstacles), you may be fine.

Mirawaraxd commented 5 months ago

I tried all of these standards, but nothing worked image I also found the file in which the error occurs (I accidentally turned off the display of errors and I don’t know how to turn it back on, so they are not underlined), I replaced all the “far” with “car”, and the problem disappeared image but now when compiling it just comes out error 3221225781 and nothing else image the following list appeared in the problems tab, all these errors are from files with installed libraries image

image

looks sad, I think that it was necessary to install a virtual box and Linux on it, a lot of time wasted, but I hope that this will save time for other people with Windows

nilsberglund-orleans commented 5 months ago

These errors seem to be related to the libraries, rather than my code. Perhaps you the version of OpenGL you installed is not suitable for windows. Sorry windows seems to be so crappy. Perhaps installing a virtual machine with a version of Unix, such as Linux, is the way to go. I know of some people managing to run the code on MacOS with minimal changes, but that is also based on a Unix-flavored system.

jeremitu commented 4 months ago

I had more success on Windows with vcpkg and cmake. vcpkg install freeglut tiff