0

Basically I moved on from the main() entry point in my project and changed to a windows project - WINAPI WinMain(...)

However Boost complains saying that cpp_main() is missing. How can I avoid this? Thanks.

user1255454
  • 669
  • 1
  • 8
  • 18
  • Post some code please – Sam Miller Mar 02 '13 at 21:44
  • There's nothing to post. I just have the WINAPI WinMain() function and linked + included the headers for boost. On compile time - it mentions that cpp_main() is missing (which I use is int main()). – user1255454 Mar 02 '13 at 21:47
  • Try keeping it as `int main()` (and telling the linker off if it complains about that). – chris Mar 02 '13 at 21:48
  • There's no such thing as "linked and included the headers for boost." Boost is a large selection of libraries that all behave in their own way and have their own requirements. – Edward Strange Mar 02 '13 at 23:48

2 Answers2

1

If you work in MS Visual Studio, create Win32Project, then use WinMain() function. If you create Console application, then use main() function. Nothing to do with boost library.

rlib
  • 7,444
  • 3
  • 32
  • 40
0

It's Boost.Test library that needs a special user-defined entry point. Please, read its manual for details.

Igor R.
  • 14,716
  • 2
  • 49
  • 83