Author Topic: Compiler Looking for main.c  (Read 4444 times)

Offline mathguy

  • Multiple posting newcomer
  • *
  • Posts: 12
Compiler Looking for main.c
« 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler Looking for main.c
« Reply #1 on: November 16, 2011, 10:31:08 pm »
(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

  • Guest
Re: Compiler Looking for main.c
« Reply #2 on: November 16, 2011, 11:02:45 pm »
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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler Looking for main.c
« Reply #3 on: November 16, 2011, 11:14:10 pm »
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

  • Guest
Re: Compiler Looking for main.c
« Reply #4 on: November 16, 2011, 11:16:27 pm »
> 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.

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: Compiler Looking for main.c
« Reply #5 on: November 17, 2011, 07:31:16 am »
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!]