是否可以使用 Turbo C/C 生成 DLL++编译器?

发布于 2024-08-10 00:21:01 字数 612 浏览 4 评论 0原文

我需要这个来从 Java 类 (JNI) 调用 C 函数,并且我知道有一些选项可以使用“Microsoft Visual C++ 编译器”来执行此操作。 (在这里解释

但我有兴趣知道是否可以使用 TC 完成类似的操作TCC

我没有“Microsoft Visual C++”的副本,不确定 cl 是否.exe 无需安装“Microsoft Visual studio”即可使用

I need this for calling a C function from Java class (JNI) and I know that there are options to do this using "Microsoft Visual C++ compiler". (explained here)

But I am interested to know if something similar can be done using TC or TCC.

I don't have a copy of "Microsoft Visual C++" and not sure if cl.exe is available without having to install "Microsoft Visual studio"

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

静若繁花 2024-08-17 00:21:01

简短回答: TC 完全有能力创建 DLL。

长答案:Turbo C++ 已经非常了。 JNI 包含文件可能使用 TC 不支持的某些语言功能。使用另一个免费编译器可能会更好,例如Visual C++ 2008 Express

Short answer: TC is perfectly capable to create a DLL.

Long answer: Turbo C++ is very old. The JNI include files might be using some language features not supported by TC. You might have better luck using another free compiler, for example Visual C++ 2008 Express.

尹雨沫 2024-08-17 00:21:01

MinGW 是 gcc 的一个自由端口。 VS 的绝佳替代品。 这里是关于如何构建 jni 库的教程。 TC太旧了。

MinGW is a free port of gcc. Great alternative to VS. Here is a tutorial on how to build jni libraries. TC is too old.

醉南桥 2024-08-17 00:21:01

cl.exe 无需完整的 Visual Studio IDE 即可使用。 Visual Studio C++ 的“快速”安装有一个仅安装命令行工具的选项(对于构建机器来说很方便)。

当然,你也可以安装IDE。您还将在该安装中获得命令行工具。

最后,Windows 驱动程序工具包 (WDK) 附带命令行编译器。

另外,您链接到的 Turbo C/C++ 是 1991 年的 - 我不确定它是否可以生成 DLL,但它几乎肯定不能生成 Win32 DLL(我猜最好的是 Win16) DLL)。除了好奇/怀旧之外,我不会用它来做任何事。如果它能用 JNI 做任何事,我会认为这是一个奇迹。

cl.exe is available without the full Visual Studio IDE. The 'Express' install for Visual Studio C++ has an option to install only the command line tools (handy for build machines).

Of course, you can install the IDE, too. You'll get the command line tools in that installation as well.

Finally, the Windows Driver Kit (WDK) comes with a command line compiler.

Also, the Turbo C/C++ you linked to is from 1991 - I'm not sure if it can generate DLLs, but it almost certainly can't generate a Win32 DLL (I'd guess that the best if can do is a Win16 DLL). I wouldn't use it for anything except curiosity/nostalgia. I'd consider it a miracle if it could do anything with JNI.

软的没边 2024-08-17 00:21:01

是的,我同意博士的观点。使用 MS 的免费工具 (Visaul C++ Express) 会更好,只需创建一个库项目,编写代码,然后将其编译为 DLL。

干杯

Yes I agree with DR. You will be much better off using one for MS's free tools (Visaul C++ Express) Just create a library project, code away and then compile it down to a DLL.

Cheers

盗梦空间 2024-08-17 00:21:01

是的,这是可能的

我已经编写了一个简单的教程,用于使用“Borland Turbo C++”和JDK 1.5实现“Hello World”程序

查看 - 此处

Yes its possible

I have written a simple tutorial for implementing a "Hello World" program using "Borland Turbo C++" and JDK 1.5

Check it out - here

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文