User forums > Help
multiple definition error: corrupt makefile?
(1/1)
yckx:
I'm getting a few weird multiple definition errors, and it looks like my problem is that Code::Blocks is trying to link the same object file twice. I can't find a makefile for the project anywhere, but here's the relevant portion of the log:
--- Quote ---mingw32-g++.exe -L"C:\Program Files\CodeBlocks\lib" -o bin\Debug\W32_Framework.exe obj\Debug\core\application.o obj\Debug\gfx\displayfactory.o obj\Debug\gfx\opengldisplay.o obj\Debug\gui\window.o obj\Debug\gui\mainwindow.o obj\Debug\gui\window.o obj\Debug\main.o obj\Debug\app\testapp.o -lopengl32 -lglu32 -lgdi32
--- End quote ---
window.o is listed twice. Does anyone know how I can correct this?
MortenMacFly:
--- Quote from: yckx on June 23, 2008, 06:37:32 am ---window.o is listed twice. Does anyone know how I can correct this?
--- End quote ---
Post the zipped project file (*.cbp). Most likely you have wrong compiler/linker settings.
yckx:
--- Quote from: MortenMacFly on June 23, 2008, 09:09:52 am ---Post the zipped project file (*.cbp). Most likely you have wrong compiler/linker settings.
--- End quote ---
Hmm... I just booted it up today after getting home from work, and it compiled fine. I'm not sure exactly what happened, or how it resolved itself. I do know that last night it compiled fine until I renamed a few files, afterwhich the linker started giving weird multiple definition errors, pointing to the same line for the 'first' and the 'multiple' definitions. And the log indicating that it was trying to link the offending file twice. And after fooling with it for entirely too long, I gave up hope.
I can still post the CBP file if you want to take a look at it, but methinks you'd be fixing a phantom issue.
Navigation
[0] Message Index
Go to full version