Anonymous
i install msys2 it's also not well for me bro
https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170
Albatross
checking this
NazTfgh
I don't know that IDE. Do you have installed the drivers for that device in your operating system?
yes. my IDE is STM32CubeIDE. And the board I am using is STM32F103C8T6 and I can not control the registers of my micro with my IDE.
NazTfgh
Maybe you should see the Documentation of the IDE. Maybe there are tutorials or examples about using it.
There was. I did search for the documentation and I definitely ask youtube, but no help.
biochem
why cannot i sending message
biochem
oh jesus, where is my message just sent, it is jusy a bit long describing the question
Anonymous
Message from djjrrnrnjej hey guys, i built a dll library debug binary using msvc, and link it to an dll release binary (msvc), and it crashed. However, debug with debug is ok, release with release is also ok. What do you think the problem is?
biochem
Oh, how do you find it!
biochem
I even cannot see that
Anonymous
Anonymous
oh jesus, where is my message just sent, it is jusy a bit long describing the question
The problem is that your debug dll and your release dll both try to load MSVCR.dll and MSVCRd.dll respectively. Since these both have the same definitions, you will get a crash at runtime I don't know about a workaround but check in MSDN forums. Am sure someone would have faced this problem before.
biochem
Oh, so you ate my message, however you spit it out, not delicious?
biochem
I have known that this question is about /MT and /MTd, on the linking parameters, and the workaround is not fabulous.
biochem
And the crashing reason is Access Violation, however, my question is, i don't want to change the linking parameters for the reason of debugging, and i want to have the problem solved.
Dot
hi guys i have a C++ project that have mote than one file i have some file like : gitignore LICENSE START.sln start folder : resource.cpp start.cpp resource.rc tapdll folder how can i compile it and give a executable file?
Anonymous
Oh, so you ate my message, however you spit it out, not delicious?
Your message got deleted because it was flagged as possible spam by our bot. I helped restore it for you.
Anonymous
I have known that this question is about /MT and /MTd, on the linking parameters, and the workaround is not fabulous.
I just told you what the problem would be with combining a dll built for debug mode with a dll built in releases mode. I explained the reason it is crashing. If you reread my post, you would understand why you are getting Access Violation" error. Anyway as far as the solution is concerned, changing linking parameters to make both the dlls use the same mode would the most obvious solution. As for other solutions, I am not familiar with them as I don't use Windows and hence won't be of much help to you there which is why I suggested checking MSDN forums. Windows related questions most often go unanswered in this forum.
Danya🔥
Open VS and click the green button
Dot
Open the solution file (.sln) with Visual Studio 2022 and build it
i just have vscode with compiler if i want visual studio i have to download 40 gb and i cant do it now anyway thank you
Chat Boss
Open VS and click the green button
Dot sent a huge message, it has been re-uploaded as a file start.cpp:5:10: fatal error: xamlOM.h: No such file or directory 5 | #include <xamlOM.h> ..
Danya🔥
You need to learn how to uncheck checkboxes
Dot
You need at most 10 GB of VS
i use cracked version so i have to download with all of the packages no choice
Danya🔥
Danya🔥
Lmao
Anonymous
Why do you use a cracked version of FREE software?
Probably VS Professional or Enterprise
Anonymous
free? :/
Yes Visual Studio Community edition is a free software
Danya🔥
free? :/
You probably need to check your PC for viruses lol
Guillermo
i just have vscode with compiler if i want visual studio i have to download 40 gb and i cant do it now anyway thank you
Vs2022 does not need 40gb, I have installed on muy computer and does not need that ammout of space
Dot
Vs2022 does not need 40gb, I have installed on muy computer and does not need that ammout of space
From where I download, there are 23 parts with the size of each part being 1.5 GB, so: 23 * 1.5 = 34.5 gb
Dot
and you need all of the components?
No, but I have to download all the parts to install it
klimi
No, but I have to download all the parts to install it
in my old days when i have used windows to code, i have downloaded the vs installer, which downloaded only the msvc and stuff and i didn't have to choose android dev, and other stuff
Guillermo
That's not necessary. You just need to install the C/C++ parts. The rest is for C# and other things
Guillermo
You should look at Microsoft for a tutorial about Desktop Programming with C/C++
Guillermo
Install C and C++ support in Visual Studio | Microsoft Learn https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation
Guillermo
You just need 7gb
abdisa
Install C and C++ support in Visual Studio | Microsoft Learn https://learn.microsoft.com/en-us/cpp/build/vscpp-step-0-installation
This is really heavy I use Clion and VS Code(yes vs code! For GUI projects) and Neovim sometimes Linux 🤌🤌🤌
abdisa
Well, depends on what are you doing
Yea but I don't know why they make it so much complicated to install packages even small packages in Windows And Mingw is rocket science for me 😣
abdisa
You have no idea I spend days tying to install SFML and curl in Windows
Guillermo
I agree with you in that every versión of Visual Studio weights more than the previous but that's something I can't complain with cause I need It anyway
Leovan
struct A { char c; double d; int i; }; Why compiler (both: 32 and 64 bit) align char to 8 bytes, not 4? But if I remove double it will be aligned to 4 bytes. I correctly understand that the alignment of each field happen to the size of the largest type in the class? But why, why not align by machine words?
abdisa
struct A { char c; double d; int i; }; Why compiler (both: 32 and 64 bit) align char to 8 bytes, not 4? But if I remove double it will be aligned to 4 bytes. I correctly understand that the alignment of each field happen to the size of the largest type in the class? But why, why not align by machine words?
The reason why the compiler aligns the char to 8 bytes in this case is due to the default alignment requirements of the system's architecture. In most modern architectures, data alignment is performed on natural word boundaries, which are typically multiples of 8 bytes. In this case, since double is the largest type in the struct, the compiler aligns the double field to 8 bytes. This means that the char field, which comes before the double field in the struct, also gets aligned to 8 bytes to maintain the natural word boundary alignment. Aligning by machine words could be a viable option, but it would depend on the specific architecture and requirements of the system. In general, aligning to natural word boundaries is a more efficient approach as it allows for faster memory access and better performance.
Aÿan
Hi guys
Aÿan
Please is it possible to install visual studio on ubuntu 22.04 ?
Albatross
Open the solution file (.sln) with Visual Studio 2022 and build it
hey bro how to compile cpp code from any directory on the comment prompt like python????????????
Anonymous
https://htdp.org/2023-3-6/Book/index.html A good book to learn Programming Design Principles. The book uses two programming languages : "Beginning Student Language" and "Intermediate Student Language" to teach design concepts for beginners. If you are familiar with a programming language already this book would be even more easier to handle. It teaches both procedural and functional programming in a way that would be very easy for beginners to grasp. Keep in mind that this doesn't teach system design or software architecture. This book teaches you how to think abstractly or in a functional manner and deciding when to use which.
Danya🔥
hey bro how to compile cpp code from any directory on the comment prompt like python????????????
Haven't you tired of asking the same question over and over again? I told you to learn about CMake but you just ignored me If you're gonna keep asking the same question, basically flooding the chat, I'll mute you
biochem
Anybody know how to debug the "CMake: Invalid preset" issue? The "--trace" or "--debug-output" paras does not work. It just output "CMake Error: Could not read presets from ... : Invalid preset". It is useless for debug. It doesn't tell me where is fault in my CMakePresets.json
biochem
However, Visual Studio can read my CMakePresets.json normally, but "cmake.exe --list-presets" cannot read it.
biochem
So, it there any command line parameters can make cmake presets debuggable?
Misha
it seems to me that it is better to use the vs code editor for cmake because it is cross-platform
Misha
and in vs code you can configure two files to automatically start the build and run
biochem
I have to use CLion on macOS, it invoke "cmake.exe --preset" to read CMakePresets.json, not like Visual Studio which read the json using its own implements, which is seems much more robust.
biochem
And both CLion and cmake.exe give me "CMake Error: Could not read presets from xxx: Invalid preset", which is really absurd.
biochem
just a sentence like that, without debug infomation
biochem
If dear you want to read my CMakePresets.json
Misha
does the error appear when you run the build in visual studio?
biochem
no errors appears, during my build on vs windows
Misha
explain when the error appears. describe your steps
biochem
damn it, it is a really long json, a typo mistake
biochem
i divided it to inspect, and solve it