Hi, My question is about library ! I would to know if the entry point of the program can be situated in a .Lib which is include in a project. To summary, can i put the main in a .Lib and how can i do to indicate to the project that the entry point is in .Lib Thanks Regards J.M.M
There should be absolutely no difference, are you sure your project is working if the main is not into the library but linked externally as a normal OBJ file?
The linker first tries to resolve symbols that are in OBJ files, then searches the libraries for unresolved symbols. You should add to your project the library containing your main. If you don't have any linker error, your program is correctly linked and a main has been found somewhere. If your program still does not work, look at the MAP file (M66) and try to understand what "main" is linked into your project, maybe another main is present in another library and this one is linked and called instead of the correct one. If this is the case, just remove the wrong main from the library or remove the library from the project. I sincerely cannot imagine a different scenario.
Sure, i have the main and a library and when i put the main in the .Lib the program doesn't work. How the program know that the main is in the .Lib , is not necessary to specify to the project? Thanks