I’m facing an issue when executing my C++ project on Windows. I use CMake to compile my project and I’ve managed to compile it without any errors. However, when I try to execute it, I encounter an “aborted()” error with no further details.
Here are some key points about my project and the issue I’m facing:
-
Environment and tools used: I’m working on Windows and using CMake to generate the build files for my project. The compilation is done with cl.exe.
-
Using MySQL Connector for C++: My project utilizes MySQL Connector/C++ to communicate with a remote MySQL database. I’ve included the appropriate header files and configured my project to link the MySQL Connector libraries.
-
Successful compilation: Compilation proceeds without errors, indicating that the header files and libraries are properly configured in my project.
-
“aborted()” error on execution: However, when I attempt to execute my project, an “aborted()” error occurs with no further details. This error occurs immediately after my program starts.
-
Available and operational database: The MySQL database my program is trying to connect to is available and operational. I can connect to this database using other database manipulation tools without encountering any errors.
I would greatly appreciate any help or suggestions to resolve this issue. If you have any ideas on what might be causing this “aborted()” error during the execution of my program, or if you have suggestions for debugging it more effectively, I would be grateful to hear them.
This is my test code :
#include <mysql/jdbc.h>
#include "db.hpp"
void start(void) {
//In my code, there are the litterals, not here for security
auto db = sql::mysql::get_driver_instance();
sql::SQLString host { /*hostname*/ };
sql::SQLString user { /*username*/ };
sql::SQLString passwd { /*password*/ };
auto connexion = db->connect(host, user, passwd);
}
The manual didn’t help me at all.
Here’s a summary of the steps I’ve taken to address the issue so far:
-
Isolating the error: I attempted to isolate the error by narrowing down potential causes, but unfortunately, the error seems too critical to proceed with meaningful debugging.
-
Allocating more memory: I tried manually allocating more memory during compilation to see if it would alleviate the issue, but it didn’t have any effect on the “aborted()” error during execution.
-
Debugging: I extensively debugged the code to identify any logical errors or memory leaks that could be contributing to the problem. However, the error persists despite these efforts.
-
Reviewing documentation: I carefully reviewed the documentation for MySQL Connector/C++ to ensure that I haven’t overlooked any crucial steps or configurations required for proper usage. Everything appears to be correctly implemented based on the documentation.
-
Checking DLL locations: I verified the location of the required DLL files both during compilation and execution to ensure they are accessible. However, this doesn’t seem to be the source of the issue.
Despite these attempts, I’m still unable to resolve the “aborted()” error during execution of my C++ program using MySQL Connector/C++. My ultimate goal is to establish communication with my remote MySQL server and manipulate the tables. Alternatively, I’d like to at least retrieve data from the available tables without altering any existing data.
Any insights or suggestions would be greatly appreciated. Thank you in advance for your assistance!
Lucas Espinar is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.