Code::Blocks Forums
User forums => Help => Topic started by: mathguy on November 16, 2011, 10:03:42 pm
-
I'm moving forward slowly but surely. I am trying to produce a DLL. When it gets to the linking stage, it fails because it is looking for main.o. My program does not have a main.c file. What do I set in CodeBlocks to prevent that error from tripping up the build and link?
-
Start reading here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29
-
DLLs do not require a main.o, a main.c or indeed a main() function. Somehow you have added a main.c to your project - somehow you need to get rid of it.
-
Having main.c doesn't mean there is main(...) function in it.
In fact on Windows you have dllmain one.
And also c::b project template creates a main.c or main.cpp file.
-
> Having main.c doesn't mean there is main(...) function in it.
I didn't say it did.
> In fact on Windows you have dllmain one.
Which is optional.
> And also c::b project template creates a main.c or main.cpp file.
I know, that's why I suggested he got rid of it.
-
Neil please reread your post to see what exactly you've suggested.