I'm trying to use some C graphic functions in Eclipse. I've copied WinBGIm files in the include/lib directories inside MINGW, but graphics.h library doesn't work yet.what is the solution?
c:\mingw\include\graphics.h:30:10: fatal error: sstream: No such file or directory
Related
I want to use a library in C so I've downloaded it (libsodium) and I'm trying to use it with a simple program and I cannot make Codeblocks to recognise it.
I get the following error
libsodium.la: file not recognized: file format not recognized
collect2.exe: error: ld returned 1 exit status
My Specs:
Architecture x64
Codeblocks
Windows 10
MinGW
I'm using the pre-builts available in the library resources and copying them into MinGW local folder and binding them to the linker following a codeblocks tutorial
What am I possibly doing wrong?
Was the prebuilt library also x64?
Did you link with the .la file instead of the .a file by mistake?
In Code::Blocks add the path where libsodium.a is to the library search path and add sodium as a library (or -lsodium as linker flag)
Have you tried building libsodium yourself? If you have MSYS2 it's not that hard:
# change the following line to the location where you want to install libsodium
INSTALLPREFIX=/usr/local
./configure --prefix=$INSTALLPREFIX --enable-blocking-random LDFLAGS="-Wl,--as-needed -lssp" &&
make install-strip &&
echo Success
I am using codegen in MATLAB R2016b to generate a .dll file as follows:
codegen -config:dll ex_fun.m -args {0,0,0,0,0,0}
I have tried to include the dll file as a reference using Visual Studio 2015 but nothing works fine and I couldn't use the .lib file as a linker eitherll.
The strange thing is that I could easily use gcc on Linux by compiling the .c script that calls the C function along with the output .so file (which is equivalent to .dll in windows) as follows:
gcc main.c ex_fun.so -Wl,-rpath=$(pwd)
However, I couldn't find any direct method in Windows. How can I use and call a .dll file output by MATLAB in a C main script program?
It should be noted that a .def file is also generated but I don't how to use it along with the output dll file.
In Visual Studio IDE:
Switch platform to "x64"
In Project properties:
C++>General>Additional include directories = ^add compilation folder.
Linker>General>Additional libraries directories = ^add compilation
folder.
Linker>Input>Additional Dependencies = "ex_fun.lib"
In code: add #include "ex_fun.h"
After compilation, copy the "ex_fun.dll" to output folder and run.
I want to use graphics.h in codeblocks 16.01 .
I have downloaded winbgi library and copied graphics.h and winbgim.h in include folder of codeblocks and libbgi.a in lib folder but when I am using it in a program I am getting:
error-fatal error:sstream no such file or directory
I have a C project in Eclipse that compiles without any errors. But due to client requirements, I have renamed my source files into .C and .H, e.i, uppercase file extensions. But when I build my project, Eclipse shows:
**** Build of configuration Debug for project test_harness ****
Nothing to build for project test_harness
The logs show that GCC didn't recognized the files with uppercase extensions as C source files. Upon searching, I found out that the .C files are actually C++ files.
But is there a way to tell Eclipse to compile .C files using GCC instead of G++?
I'm using Eclipse CDT for C programming with (MinGW) and I have to install a sdk ON ECLIPSE "called Decklink SDK". My Problem is that the SDK is in form of IDL files so I have to compile them to get somes .h and .c files so I can use them correctly. My question is how can I compile IDL for C in eclipse.
In visual Studio it's pretty easy, but I can't use it at work.