News:

Accounts with zero posts and zero activity during the last months will be deleted periodically to fight SPAM!

Main Menu

Compiler Looking for main.c

Started by mathguy, November 16, 2011, 10:03:42 PM

Previous topic - Next topic

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

(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

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.

oBFusCATed

Neil please reread your post to see what exactly you've suggested.
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]