That is because neither a DLL nor a static library are programs so they are not executable.
A DLL is a loadable image but it is loaded by a program. If you want to test your functions and debug them you will need to create a program that calls them.
Look before you go any further how do you intend to achieve "can be later included in projects"? Do you intend to take the source files and just compile and link them into your later projects or do you intend to create a library with them and then link your later projects with this library.
It makes a difference to what you do now.
If you are going to create a library that you will link later projects with then you are on the right tracks already. To test your code you will need to create an application to call the library (it can be another project in the same workspace).
If you intend to just compile and link the source code into future projects then there is little point you creating a library now as it would just result in you needing multiple projects as above. You may as well have a program that includes both your functions and the test code and main. Now unfortunately that would mean changing your project type again but the reason we have directed you to use a library project is that you have been resisting adding a main function to your code in order to make it a program. If you are going to do this we would of course advise putting the main function into a separate c file.
A DLL is a loadable image but it is loaded by a program. If you want to test your functions and debug them you will need to create a program that calls them.
Look before you go any further how do you intend to achieve "can be later included in projects"? Do you intend to take the source files and just compile and link them into your later projects or do you intend to create a library with them and then link your later projects with this library.
It makes a difference to what you do now.
If you are going to create a library that you will link later projects with then you are on the right tracks already. To test your code you will need to create an application to call the library (it can be another project in the same workspace).
If you intend to just compile and link the source code into future projects then there is little point you creating a library now as it would just result in you needing multiple projects as above. You may as well have a program that includes both your functions and the test code and main. Now unfortunately that would mean changing your project type again but the reason we have directed you to use a library project is that you have been resisting adding a main function to your code in order to make it a program. If you are going to do this we would of course advise putting the main function into a separate c file.
Comment