ar

How do I add objects with a custom extension to a cmake library?

巧了我就是萌 提交于 2021-02-07 20:10:54
问题 I'd like to add some object files to a CMake static library, but they have a custom extension. Here's what I've tried: set(SRCS testfile.cxx jsobj.js) add_library(testlib STATIC ${SRCS}) When made, CMake invokes ar testfile.cxx.o (ie the other file is completely ignored). How do I get it included in the archive? Here are some other tricks I've tried: list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS js) list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS js) # no luck add_custom_command(OUTPUT ${CMAKE

How do I add objects with a custom extension to a cmake library?

南楼画角 提交于 2021-02-07 19:58:35
问题 I'd like to add some object files to a CMake static library, but they have a custom extension. Here's what I've tried: set(SRCS testfile.cxx jsobj.js) add_library(testlib STATIC ${SRCS}) When made, CMake invokes ar testfile.cxx.o (ie the other file is completely ignored). How do I get it included in the archive? Here are some other tricks I've tried: list(APPEND CMAKE_CXX_SOURCE_FILE_EXTENSIONS js) list(APPEND CMAKE_C_SOURCE_FILE_EXTENSIONS js) # no luck add_custom_command(OUTPUT ${CMAKE

OS X linker unable to find symbols from a C file which only contains variables

為{幸葍}努か 提交于 2021-02-07 05:32:27
问题 I am having problems with the linker when porting a C library from Linux (Ubuntu) to OS X. The C code is auto-generated from Matlab, so ideally I don't want to change the code itself. The problem seems to be in a C file which contains ONLY uninitialised variable declarations, which are then EXTERNed by other C files to implement the Matlab algorithms. The OS X linker is apparently unable to recognise symbols from this file. The same source code works fine on Linux, so I want to understand how

深源恒际与阳光产险合作升级:AR视频智能定损上线 人人都是定损员

随声附和 提交于 2020-11-24 19:51:20
本文作者:c****t   近期,深源恒际推出AR视频智能定损产品,并就此与阳光产险达成进一步合作。作为图像定损产品的升级版,AR视频智能定损产品直接面向终端用户开放,用户按照系统操作指引拍摄、上传视频,即可快速获取定损结果、维修方案及理赔金额,整个定损环节由车主自主完成。   近年来,随着国内汽车保有量持续增长以及商车费改等相关政策的出台,车险投保率持续增高。对保险公司而言,利用前沿技术手段提升服务效率、满足不断扩大的市场需求,是顺应行业发展的必然选择。   深源恒际致力于计算机视觉技术研究应用,着重面向保险及保险相关的泛金融领域,打造行业应用级计算机视觉引擎,植根于业务场景下的痛点需求,提供相应的技术解决方案。   2018年,深源恒际首次面向车险理赔场景推出图像定损产品,并与阳光产险达成合作。基于图像识别技术,结合海量样本数据,构建车辆外观损伤识别专用算法模型,自动识别、判断车辆外观损伤情况,包括损伤位置、损伤部件、损伤类型及损伤程度等。   图像定损的应用帮助阳光产险实现了定损作业自动化,用户上传损伤照片后系统自动判断伤情并输出定损报告,无需定损员现场查勘,一方面大幅节约了人力成本,另一方面也有效提升了理赔服务效率。   今年5月,深源恒际对图像定损产品进行全面优化,在图像识别基础上增加了视频检测、视频跟踪、AR等技术手段,由图像定损升级为AR视频智能定损

CMake append objects from different CMakeLists.txt into one library

℡╲_俬逩灬. 提交于 2020-05-23 21:13:25
问题 I would like to create a single library from objects from multiple sub-directories, each one containing their own CMakeLists.txt with OBJECT library trick to have multiple targets with different compile options. Here are the files: project_dir |--- subdir1 | |--- src1.c | |--- CMakeLists.txt |--- subdir2 | |--- src2.c | |--- CMakeLists.txt |--- CMakeLists.txt Contents of all CMakeLists.txt // project_dir/CMakeLists.txt // what to put here? to make one single library (mainLib) // project_dir

trouble compiling against static library

萝らか妹 提交于 2020-01-16 06:20:11
问题 I have created a static library, libstuff.a , with gcc and ar . I've installed the library in /custom/lib/dir/ and the header files in /custom/include/dir/ . When I try to compile another application against the archive, I am running into issues. The application I am trying to compile basically uses gcc -L/custom/lib/dir/ -I/custom/include/dir/ -lstuff . When I attempt to compile, I get error about a function I declare in stuff.h and define in stuff.c . main.c:51: undefined reference to

Undefined reference to my own library

余生长醉 提交于 2020-01-15 08:48:25
问题 I've created my lib.a file with several gcc -c file.c -o file.o then ar sr lib/libtest.a file1.o file2.o file3.o confirmed with ar -t lib/libtest.a file1.o file2.o file3.o but when I try to compile test aplication gcc lib/libtest.a test.c -o test I got undefined reference in function main : to used function from file1.o, file2.o, file3.o 回答1: Order matters with libraries - try: gcc test.c -o test lib/libtest.a Basically, the linker reads the library when it comes across it on the list of

Static library link issue with Mac OS X: symbol(s) not found for architecture x86_64

孤街醉人 提交于 2020-01-09 11:14:06
问题 I'm trying to generate a static library and link it with an execution binary. This is a library function: #include <stdio.h> int hello() { return 10; } With these commands, I could get a static library. gcc -c io.c ar -crv libio.a io.o With lip -info , I checked it is x86_64 architecture. ar> lipo -info libio.a input file libio.a is not a fat file Non-fat file: libio.a is architecture: x86_64 This is the main function that uses the library. #include <stdio.h> extern int hello(); int main(int

Creating a .deb with Apache Ant and without dpkg

ぐ巨炮叔叔 提交于 2020-01-05 02:53:08
问题 I'm trying to create a buildfile for creating .deb installation files. So far, so fine. My goal is to avoid dpkg, so that the build can be done from any plattform. Now that I created all the artifacts (control.tar.gz, data.tar.gz, debian-binary) I need an Ant-Task to package these Files in a deb-File. A deb File is just an Ar(l)-Archive, but I couldn't figure out how to create such an Archive with Ant. I just found some "ArFileSet", so I think there is a possibility, but I don't know how and

Possible to use a .dll on Linux

耗尽温柔 提交于 2020-01-01 02:10:13
问题 Question: Is it possible to compile a program on linux using a .dll file? Where this is going: This .dll will be used to write a php extension to some proprietary software from a third party. Background and Research: I have been given a library called proprietary.lib . I was curious, as I have never seen the .lib extension before, so I typed: file proprietary.lib The output was: proprietary.lib: current ar archive I did some research and found that ar is more-or-less tar (and in fact, I guess