Is there a way to force a project to generate a library for its libraries.main with the cpp plugin?


(Daniel Mijares) #1

Hi, question involving the grade cpp plugin… One project generates a .lib so I can use it as an inter-project dependency, but another doesn’t. I’m really quite new with this plugin and my c is rusty so bare with me please.

This is my output from running ‘gradle compileMain’ > :mainExtractHeaders UP-TO-DATE > :compileMain SKIPPED > :BallisticPropagator:mainExtractHeaders UP-TO-DATE > :BallisticPropagator:compileMain > BallisticPropagatorJavaInterface.cpp > JniPropagatorConversions.cpp > PropagateECR.cpp > Generating Code… >

Creating library C:\Users\1081584\dev\GBIAMD\gradle\cpp\BallisticPropagator\build\binaries\BallisticPropagator.lib and object C:\Users\1081584\dev\GBIAMD\gradle\cpp\BallisticPropagator\build\binari > llisticPropagator.exp > :BattleManagerSDKCommon:mainExtractHeaders UP-TO-DATE > :BattleManagerSDKCommon:compileMain > ConfigFileReaders.cpp > EarthConstants.cpp > MathUtils.cpp > Polynomial.cpp > TrackPropagation.cpp > Generating Code… > :ConfigFileReader:mainExtractHeaders UP-TO-DATE > :ConfigFileReader:compileMain > ThreatParametersFileReaderJavaInterface.cpp > WeaponParametersFileReaderJavaInterface.cpp > Generating Code… > LINK : fatal error LNK1181: cannot open input file ‘C:\Users\1081584\dev\GBIAMD\gradle\cpp\BattleManagerSDKCommon\build\binaries\BattleManagerSDKCommon.lib’

So I see the

Generating Code… >

Creating library C:\Users\1081584\dev\GBIAMD\gradle\cpp\BallisticPropagator\build\binaries\BallisticPropagator.lib and object C:\Users\1081584\dev\GBIAMD\gradle\cpp\BallisticPropagator\build\binari

but I am stumped as to why I don’t see it at

TrackPropagation.cpp > Generating Code…

Because, incidentally, that is the one I really need.

this is a shot of the project layout.

Here is the main ‘build.gradle’ and the ‘ConfigFileReader.gradle’ file. Every project just generates a dll right now.

IF the ‘BattleManagerSDKCommon’ project was generating the lib file, I think it would work.

Am I missing something?

Thanks,

Danny