Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » compiler error(break point egnored in debugger)
compiler error [message #1859489] Sun, 11 June 2023 00:44 Go to next message
sydney faria is currently offline sydney fariaFriend
Messages: 54
Registered: March 2013
Member
I got this design pattern example from bogotobogo. At first it wouldn't compile so I tried the pragma in the commented out //1 line. it got rid of the errors but the code still didn't work. Then I noticed that the compiler was complaining about casting char * in the lines marked //2 so I replaced these 3 lines with the following lines using "const char[]" and now the error went away!! This got rid of all the errors and I thought that I had to problem solved. I ran the program and the command window shows nothing and showed the .exe process stopped working and upon exiting the window I get "process exited after 7.97 seconds with return value 255". Wow this is getting strange to say the least! Then I tried getting rid of the strcmp() by replacing lines //3 with "type == "windows". It compiles with no errors once again, but I still get nothing in the command window! So I added in a break point right after the main() and tried running in debug mode and start right after main() to see where the scewup is at! Now I go straight to the command window, even though I stopped right after main()! So the debugger is being ignored. Now things are very strange!!! Attached is the .cpp file that I am working with. I numbered the commented out lines with //1 etc to see what I did working with this project. Sure hope some one sees something that I missed with this code.
Sydney / wt1v
  • Attachment: main.cpp
    (Size: 1.11KB, Downloaded 62 times)
Re: compiler error [message #1859577 is a reply to message #1859489] Fri, 16 June 2023 12:25 Go to previous message
Kabiru Usman is currently offline Kabiru UsmanFriend
Messages: 42
Registered: April 2023
Member
From the details provided, it seems like your program is crashing somewhere which is why you're getting the exit status 255. The debugger being ignored suggests an issue early in your program's execution. Check for null pointers or uninitialized variables. Also, ensure you're using the correct type of char array (`const char[]` vs `char*`). Also, replacing `strcmp()` with a direct string comparison (i.e., `"type == "windows"`) won't work in C++. Instead, use `std::string` for string comparison or stick with `strcmp()`.


Previous Topic:Parallel build make not working as expected
Next Topic:is there any possibilities to change the indexer preference page - programmatically
Goto Forum:
  


Current Time: Mon Jan 20 00:20:51 GMT 2025

Powered by FUDForum. Page generated in 0.03483 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top