User forums > Help
Compiler Looking for main.c
mathguy:
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?
oBFusCATed:
Start reading here: http://wiki.codeblocks.org/index.php?title=FAQ-Compiling_%28errors%29
zabzonk:
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.
oBFusCATed:
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.
zabzonk:
> 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.
Navigation
[0] Message Index
[#] Next page
Go to full version