User forums > Using Code::Blocks
Compiling results in "...built it now?" - but no outputfile is generated...
cysign:
Hi,
I'm using code::blocks für a c-project since a few days.
At one point I got a compiling problem.
There was no code-error but code::blocks asks:
It seems that this project has not been built yet.
Do you want to built it now?
But....that project previously existed.
I compiled it thousands of times...but when I changed
--- Code: ---int anzahlmp = 7;
double mpx[7];
double mpy[7];
--- End code ---
to
--- Code: ---int anzahlmp = 7;
double mpx[anzahlmp];
double mpy[anzahlmp];
--- End code ---
That problem occured. I undoed the changes but c::b isn't able to compile the project anymore.
The same issue happened the thirt time right now and the previous times I created a new projectfile and copied all sources into it.
As I like c::b I't like to reslve that problem.
Maybe you should know I'm using GCC with the linkers: m;udev
I enables -Wall. And Build log tells me:
--- Code: ----------------- Build: Debug in j2k_mp ---------------
Linking console executable: bin/Debug/j2k
obj/Debug/fileio.o:(.data+0x0): multiple definition of `anzahlmp'
obj/Debug/data2angle.o:(.data+0x0): first defined here
obj/Debug/main.o:(.data+0x0): multiple definition of `anzahlmp'
obj/Debug/data2angle.o:(.data+0x0): first defined here
obj/Debug/sensor.o:(.data+0x0): multiple definition of `anzahlmp'
obj/Debug/data2angle.o:(.data+0x0): first defined here
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Build Message:
||=== Build finished: 0 errors, 0 warnings ===|
--- End code ---
But there's still no outputfile...
Jenna:
--- Quote from: cysign on March 12, 2013, 12:51:37 pm ---Maybe you should know I'm using GCC with the linkers: m;udev
I enables -Wall. And Build log tells me:
-------------- Build: Debug in j2k_mp ---------------
Linking console executable: bin/Debug/j2k
obj/Debug/fileio.o:(.data+0x0): multiple definition of `anzahlmp'
obj/Debug/data2angle.o:(.data+0x0): first defined here
obj/Debug/main.o:(.data+0x0): multiple definition of `anzahlmp'
obj/Debug/data2angle.o:(.data+0x0): first defined here
obj/Debug/sensor.o:(.data+0x0): multiple definition of `anzahlmp'
obj/Debug/data2angle.o:(.data+0x0): first defined here
collect2: error: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings
Build Message:
||=== Build finished: 0 errors, 0 warnings ===|
--- End quote ---
You obviously have linking errors, that are not recognized by C::B's regexes.
That can happen, if new or unusual compilers/linkers are used.
But the build log clearly states the errors.
By the way, please use code-( or quote-)tags if you post the content of a build-log or source-code. This makes your post much more readable.
cysign:
Thanks for your answer.
But I didn't change any linker while this error orrured.
Do you have any idea why my changes effect the linkers?
thomas:
Though this highlights an actual bug. If the linker reports an error, the build log shouldn't say "0 errors, 0 warnings" afterwards.
Never noticed this before (probably because I rarely have linker errors). Apparently the build log only cares about compiler messages and ignores the linker.
Jenna:
--- Quote from: thomas on March 13, 2013, 10:55:12 am ---Though this highlights an actual bug. If the linker reports an error, the build log shouldn't say "0 errors, 0 warnings" afterwards.
Never noticed this before (probably because I rarely have linker errors). Apparently the build log only cares about compiler messages and ignores the linker.
--- End quote ---
There have been changes to how the compiler-plugin counts errors and warnings recently, so it might be fixed.
Or the plugin just do not recognize the errors as errors, because the regexes do not cover them coorectly.
Nevertheless a linking process with a return value, that is not zero, can (should) probably be treated as error or whatever.
Navigation
[0] Message Index
[#] Next page
Go to full version