All Questions
32 questions
0
votes
0
answers
14
views
Including static .a Libraries in CMake Project [duplicate]
I am working on a project for STM32 in VSCode and I need to include libraries with the .a extension to be able to call their functions. I need help with configuring CMake. My current CMake setup looks ...
1
vote
0
answers
110
views
wlink to create an executable from obj files and libraries
I got the newest version of WATCOMs wlink from github (V2.0 29.04.2024, https://github.com/open-watcom/open-watcom-v2) and djgpp-mingw-gcc1220-standalone from github too (https://github.com/andrewwutw/...
-1
votes
2
answers
341
views
How to link a static library to another
I have a problem with my static libraries. I got one for the use of multimedia elements and
another for C general use (linked list...). I want them to be separated to not bloat my program.
Try as I ...
0
votes
1
answer
1k
views
How can I compile Cimgui statically and then use it?
I'm new to C and I need some help with linking and compeileing.
Here is the library which I want to use: cimgui github
I followed the instructions about how can I compile the library with the makefile ...
0
votes
1
answer
252
views
Makefile: need to run `make` twice to relink objects file
Here is the relevant part of my Makefile.
...
LIBS = gc ft
vpath %.a $(LIBS:%=lib%)
all:
$(MAKE) $(NAME)
$(NAME): $(LIBS:%=lib%.a) $(OBJS) | libs
$(CC) $(CFLAGS) $(OBJS) -o $(NAME) $(...
0
votes
0
answers
2k
views
Convert .a file into .lib file for C/C++ project
I have got a question. In my quest to add external packages to my C/C++ project, i read differents topics about how to convert static library (.a) into static library (.lib). I downloaded packages and ...
1
vote
2
answers
2k
views
Failing to install gtkmm / gtk+
So i am new on the platform, i use c/c++ and i have interests in graph interfaces so i decided to use gtk+and gtkmm with visual studio.
First, i downloaded gtk for the gnome project. I followed all ...
0
votes
2
answers
168
views
Library file (.a) where the contents of the structure changes
I am creating an algorithm in C that is confidential and cannot be shared with external customers. So, I decided to go with creating a library (.a) file which compiles my algorithm and lets others use ...
-1
votes
1
answer
791
views
converting .c file to .o using processes
I have to make a project which asks me to create a program that will compile a C project by recursively descending into directories and launching processes which compile a file of code by calling GCC ...
5
votes
1
answer
3k
views
Hide symbols from a 3rd party .a file that is linked into a .so file
I am building a shared (.so) library that is composed of several .a files and a thin API layer that invokes them. I only want my API and external dependencies to be visible, so I build my code using ...
1
vote
1
answer
229
views
Link .a file with CMake, using VS 2013 compiler
I've got the following file tree:
C:.
│ CMakeLists.txt
│ myLibraryHeader.h
│ test.c
│
└───myLib
├───win32
│ myLibrary.a
│
└───win64
...
0
votes
0
answers
54
views
libidn build .a and .so lib giving different result
I am trying to use GNU libidn, compiled from source code. If I build my application with libidn.so, the function is working fine. (Only interested in the function stringprep_profile(). This function ...
3
votes
2
answers
2k
views
How to build .lib files using Code::Blocks IDE
I have a C project which I would like to build as a static library and not as a executable.
My high level environment is:
IDE: Code::Blocks 16.01
Operating System: Windows 7
Compiler: MinGW (GCC ...
0
votes
1
answer
577
views
IAR build library with different #define
I am going to build a simple library (.a file) in IAR Workbench for STM8. In this library, I want to implement both hardware SPI and software SPI for users to choose.
In my library.c, I wrote:
#...
4
votes
1
answer
812
views
Attempting to compile with my own static C library
I compiled a static library. I have two files.
mylib_1.c with function foo1 in it
mylib_2.c with function foo2 in it.
Both #include "mylib.h".
I compiled a library like so:
gcc -c mylib_1....
-1
votes
1
answer
511
views
How to malloc a preprocessor directives
I have a macro as follow.
#define WR_BLK_SIZE_REGINFO 123
Am using this macro in a library project(.a). Library projects are pre-compiled where the size of "WR_BLK_SIZE_REGINFO" cannot be changed as ...
0
votes
2
answers
113
views
User defined .c and .h file management
I am building a small library of my own *.c & *.h files and am not sure how I should manage them, especially when including them into a project. I'm using Codeblocks on Ubuntu in case that matters....
0
votes
2
answers
477
views
How do i call methods from .A file in C project?
I've got file with .a extention, and file.h that represent the
functions in the .a file.
How can i call the functions in the .a file from a new C project?
I am using Visual studio, and i serached ...
0
votes
1
answer
413
views
Makefile: add library to another project
I want to change an existing makefile to include another static library that I made myself. I followed some instructions to make the library; it currently holds all the .o files except for main.o. Let'...
0
votes
1
answer
278
views
Using 32 bit .a library file in 64 bit linux machine
I am trying to use 32 bit .a files in a 64 bit machine. I compiled source code using gcc -m32 option. It gave following error
gcc -m32 *.c -Llib -lquanser_communications -Iinclude -o prg.o`In file ...
0
votes
0
answers
103
views
error of compiling and linking example C propgrams in an open source tool (SCIP) in cygwin32 on win7
This is not a programing question but a tool (SCIP) install and library "mismatch" problem on cygwin 32 on win 7.
If you do not think this is a good place to ask this, please let me know before ...
1
vote
2
answers
4k
views
ndk-build Error prebuilt-library.mk:28: *** missing separator. Stop
I'm getting the error
Android NDK: ERROR:src/main/jni/Android.mk:Cortex: The LOCAL_SRC_FILES
for a prebuilt library should only contain one item
/Users/peterchappy/Library/Android/ndk/build/core/...
0
votes
1
answer
117
views
Link SDL in archive file
I've got a projects, for an embedded STM32.
I've got some code "strategy" used to determinate where the robot should be going. The strategy uses a "pathfinding" library.
The latter can use SDL for ...
24
votes
1
answer
50k
views
Including header file from static library
I am making a test setup of a C static library and program.
The library code, located in a subdirectory 'foo' of my project, contains the following files:
foo/foo.c:
#include <stdio.h>
void ...
1
vote
1
answer
180
views
About compile with .so in Linux
I have developed a shared library B.so, which depends on A.so.
When I write a program test.exe using B.so, but there is a compile error, it said that some symbols(the symbols are in A.so) not found.
...
0
votes
1
answer
5k
views
How to use C-Library in C#
i´ve downloaded a BACnet-Stack from http://sourceforge.net/projects/bacnet/ but it is written in c and i want to use it in c#.
I´ve been reading for 4 hours now about how to get it done but i´m not ...
0
votes
2
answers
1k
views
Link a static library on a .cpp file
I'm trying to compile some code that use a function implemented in a static library named staticlib.a. I also have the header named staticlib.h which contain the declaration of that function. My main, ...
3
votes
1
answer
2k
views
Compiling a c application that links to a static library on AIX
I'm trying to compile my application to link to a static library (.a file)
The command I use to build is this:
gcc -DUNIX -maix32 -o Release/bin/testApp Release/obj/main.o -ltestLib
When I build I ...
579
votes
5
answers
572k
views
What are .a and .so files?
I'm currently trying to port a C application to AIX and am getting confused. What are .a and .so files and how are they used when building/running an application?
0
votes
1
answer
5k
views
Parse Linux static Libraries (.a) in C [closed]
I want to know how to parse a linux static librarie (.a) to get content of each files.
Thank's to help me !
12
votes
5
answers
4k
views
`ar` library override timestamp
the .a archive format header requires a timestamp. This has led to countless headaches when I rebuild a static library, mainly because I can't exactly reproduce the original binary.
For example (...
4
votes
0
answers
589
views
How to collect data from different .a files into one array? How to keep sections in .a files with ld script?
I need to collect some data from different .a files to one array.
I do it by collecting data to one section
first .c file
TArElement __attribute__((section(".my.special.section"))) uwiveuve = { ......