Linked Questions
23 questions linked to/from Call a C function from C++ code
0 votes
2 answers
234 views
calling .c file inside .cpp
I am trying to call a C file (dispmanx.c) from a C++ file (main.cpp). dispmanx.c : #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdlib.h> #include <stdarg.h>...
1 vote
0 answers
210 views
C++ Builder - Warning W8127 Function defined with different linkage
I have imported an Activex component (*.ocx) on Embarcadero C++Builder 10.2 when I build the program I get this warning "Warning W8127 Function defined with different linkage". Can any one tell me ...
0 votes
1 answer
162 views
How common is it to mix C with C++? [closed]
I wanted to know how widely used is the mixing of C++ and C. I mean as in using of C libraries/functions and call it in C++ program like how it is done here Mix C with C++. How extensive is its use in ...
0 votes
0 answers
122 views
How to define extern "C" functions in my c++ file?
I have a .so library that I want to link with C++ code. There's a function called add on the .so file that respect C interface (its declared as extern "C"). I don t have the .h file so I did ...
0 votes
0 answers
92 views
Add library in qt linux [duplicate]
I created a project library in Clion and got a *.a file. In qt_gui.pro I added: LIBS += -L /path/to/*.a/file INCLUDEPATH += /path/to/directory/h_files Also I created new .h file with: extern "C" { ...
0 votes
1 answer
83 views
Why linkage failed even when nm found the symbol?
When I compile a demo main.cpp, it failed because undefined reference to a_mtk_bt_service_init(), but I have found the symbol by nm -D ./libmtk_bt_service_client.so|grep a_mtk_bt_service_init, it'...
0 votes
0 answers
77 views
compiling a "C" based lib in a C++11 project in VisualStudio
I'm trying to use a C based library into my C++ project. The C header files come already with extern c {...} The problem is as soon as I add some includes which are C++11 based (like Thread, ...
1 vote
0 answers
67 views
Invoking an application in C from a winforms
I have developed an application in C using Visual Studio 2022 on a Windows 10 platform. When starting up the application in the console in main(), the user is first asked to specify encode or decode, ...