When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
29 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
You would need to rather use DllImport: https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.dllimportattribute
but wouldnt that get rid of the code autocompletion / intellisense?
afaik the libs i imported via project reference so far all supported direct code completion when trying to use them via using myLib;
You would declare the external function's signature and then it can be used in IntelliSense.
would that still be the case when i use it on another C++ project? cause the lib im writing will mostly benefit my other C++ projects in the future (replica of C# HttpClient cause i work a lot with REST APIs)
i put a lot of value into autocomplete cause i can tab through everything
Another C++ project would also need the declarations of the functions in the DLL.
Usually the DLL project would create header files containing those declarations.
and when i have the header file i would not need such declarations?
cause i think i made an error in my general code structure / build process
The header files contain the declarations.
i never had issues with DLL imports as project references

in this case my header files are correct
i saw a few tutorials by now and they all use project reference import
which then they could just put using libName; and had access to its functions

ill try DLLImport
what if i were to make a .lib project, a static library
could i embed that directly into my C++ projects?
You would still need to include the headers.
yes
the only libs i ever wrote were Java and C# fpr NuGet 
ill try static libs i think they are more of what im looking for
@plush dome
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. In the future you can use !solved to close a post and mark a post as solved.
Thank you and let us know if you have any more questions!
This thread is now set to auto-hide after an hour of inactivity