Currently, I am transferring a project with several hundred code files and dependencies to several third-party libraries in Mac Os. I finally got to the point that the program compiles without warnings or errors, but it does not seem to perform my own main function.
Instead, it seems to perform some other basic function, which seems to belong to a third party. This function writes some diagnostic data to the console and displays them later:
(gdb) continue Current language: auto; currently c++ // // This is an automatically generated file. // Do not edit. // const unsigned short expTable[] = { 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, ... 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, 0x3c00, }; Debugger stopped. Program exited with status value:0.
I cannot use the debugger to find out where this main function is located, because although the stack trace seems valid, gdb does not show me the correct line number and file name for each stack entry (see this unresolved question ).
The search took several minutes, but yielded no results.
My project uses SDL among other libraries, but I reward SDL_Main () and the main problems and built my project on top of the perfectly working SDL project template. Therefore, I am absolutely sure that my main function is valid.
Do you have any ideas what might be wrong? I currently have no ideas on how to find and remove the main scam function.
Thanks,
Adrian
EDIT: As I just found out, I made a mistake when searching for files with the string "This is automatically generated." I just found dozens of files with one line, all of which belong to FreeImage, one of the third-party libraries that I use. So the problem seems to be related to FreeImage, but I don’t yet know how to do this, since I compiled Freeimage as a library with the MacOs make file attached and included only the library. I will try to rebuild a newer version of FreeImage and see it if this fixes my problem.