如何在Ubuntu中将c ++编译为Window的.net Dll文件

时间:2015-10-27 07:35:59

标签: c++ .net ubuntu gcc dll

现在我可以通过使用提供的make文件成功编译,现在我想将项目编译为dll文件,我应该如何修改make文件以便我可以在windows .net框架中使用dll文件?我希望有一个.net DLL(不只是一个win32 dll)。

make文件是:

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)

1 个答案:

答案 0 :(得分:-1)

在谷歌搜索"在Linux上交叉编译器"。这个问题已经多次问过了

Create a library or DLL in Linux and using them on Windows

How to compile for Windows on Linux with gcc/g++?