I'm using a windows port of gcc, g++, etc. as a compiler.
How would I compile a DLL, and define/use its exports? Can I compile header files, classes, etc. into a DLL or only functions? Can DLL functions call functions in a program, or is it only one-way? For example, if I wanted to make a program part open source and part closed source, with the classes and main functions stored in a DLL but certain application-specific functions stored in header files or .cpp files--like, if the DLL function wanted to generate an error, but the application that was using the DLL had a specific way of displaying the error (writing it to a listbox, making it into a message box, etc), could the DLL call a "error" function that is defined elsewhere in the project code or does that function need to be compiled into the DLL?

I'm pretty sure you can give it a function pointer as a parameter....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.