I turned my C++ Dynamic link library into Static library just to acquire more knowledge. My question is how can I use the .obj file to compile both projects with C# express/MS visual studio?
Run the gcc command to compile your C program. The syntax you'll use is gcc filename. c -o filename.exe . This compiles the program and makes it executable.
Type "cl filename. c" (without quotes) and press the "Enter" key to compile the code page. The C file is compiled into an executable (EXE) file named "filename.exe."
The compiler checks the source code for the syntactical or structural errors, and if the source code is error-free, then it generates the object code. The c compilation process converts the source code taken as input into the object code or machine code.
No, you can't access static libraries directly from C#. You have to use a DLL.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With