简体   繁体   中英

Compile for distribution on Windows 7 using NetBeans C++

I made a application in Netbeans on windows 7. I want to run it on another system but it seems to have lots of dll's it depends on. The compiler tool kit I am using is MinGW, and the first two missing dll's are form that. I only get one missing dll file per run so it is a lot of back and forth to find them all.

Is there a way to list all the dll's that my executable depends on?

Is there a way to compile it so that it does not depend on so many of them (ie compiles the code into the exe)?

Thanks

From the menu bar, select Menu -> Project Properties . Then in the categories column, expand the node that says Build and select Linker . Then in command line under additional options, add -static-libgcc -static-libstdc++ . This will statically link the C and C++ libraries for you. You can also add other libraries with the -static option.

There are tools to help you find dependencies for you, but for windows dlls, I usually just look at MSDN. Here is an SO question that talks about some tools if you want to use them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM