IDE Troubles. Errors that don't exist.
Using Codeblocks on the my source found here
https://gitlab.com/jmgibson1981/mycp...les/File%20Ops It fails with 2 errors to even compile in CodeBlocks. The first error is Code:
line 58 multiple definition of `file_search_func';obj/Debug/mycprogress/Source Files/File Ops/fileprocess.c Code:
error: ld returned 1 exit status Code:
-Wall -O1 I thought I might have some cruft in the project folder, so I created a new project and imported these 2 source files. Same result. I'm at a loss. I like the IDE, it helps me find my syntax errors (which are thankfully getting fewer and fewer) but this just baffles me. Especially considering it's set to use GCC... I just don't get it. |
My guess is that Codeblocks is mishandling the spaces that you have in: `file_search_func';obj/Debug/mycprogress/Source Files/File Ops/fileprocess.c
Perhaps you could put in escape characters that are recognized by both C and Codeblocks if there is such a thing. Or if the names aren't set in stone yet you could use underlines instead of spaces. |
I'm assuming you are talking about the path folders? If so then it made no change. changed them to lowercase _ separated names.
I may try to build on Windows, if only to see if that changes anything. It is an odd one. *EDIT* Same issue on Windows, slightly different wording. However in Visual Studio Code back on my kubuntu side it compiles and debugs clean. |
Plausible answer at: https://stackoverflow.com/questions/...-in-codeblocks
Quote:
|
Remove this line from your mylibs.h file:
Code:
#include "fileprocess.c" |
Well played. Thank you much. Worked just perfectly. So it will automatically check for the functions in any file in the project?
|
I would start here: https://en.wikipedia.org/wiki/Linker_(computing)
|
All times are GMT -5. The time now is 01:35 AM. |