[英]How to compile c++ to Window's .net Dll file in Ubuntu
Now I can compile successfully by using make file provided, now I want to compile the project to dll file, how should I modify the make file so that I can use the dll file in windows .net framework?现在我可以使用提供的make文件编译成功,现在我想将项目编译为dll文件,我应该如何修改make文件以便我可以在windows .net框架中使用dll文件? What I wish to have is a .net dll (not just a win32 dll).
我想要的是一个 .net dll(不仅仅是一个 win32 dll)。
The make file is:生成文件是:
default: all
# -------------------------------------------------------------------
# Change the path to Z3 4.1.1 accordingly
# The directory indicated by this path should contain "lib" and "bin"
# e.g. "/home/z3_src_4.1.1"
# "/home/work/tool/z3/z3_src_4.1.1"
# -------------------------------------------------------------------
Z3_path = ../z3
JUNK = S3
SOURCE = strTheory.cpp testMain.cpp
INCLUDE = $(Z3_path)/lib
LIB = $(Z3_path)/bin/external
all: $(SOURCE)
g++ -std=c++14 -O3 -fopenmp -static -I$(INCLUDE) -L$(LIB) $(SOURCE) -lz3 -lrt -o S3 -Wall
@echo ""
clean:
rm -f $(JUNK)
Search in the google for "cross compilers on linux".在 google 中搜索“linux 上的交叉编译器”。 This question already asked several times
这个问题已经问过好几次了
Create a library or DLL in Linux and using them on Windows 在 Linux 中创建库或 DLL 并在 Windows 上使用它们
How to compile for Windows on Linux with gcc/g++? 如何使用 gcc/g++ 在 Linux 上为 Windows 编译?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.