No you don't. The linker will only expect to find a main() if the template type is app. Amletos' example builds cleanly and correctly with MingW.
When you build a "lib" project with you will get a shared library by default on Linux and Windows. All that adding "dll" to CONFIG does is request a shared library again.
If you build the project with the MingW tools there will be a resulting helloworld_dll.dll file and a libhelloworld_dll.a file.
If you build the same project with the Microsoft compiler you will get helloworld_dll.dll and helloworld_dll.lib.
The linkers use information from the .a or .lib file to arrange linking to the the .dll at run time. Only the .dll file is required at run time.




Reply With Quote
Bookmarks