When I setup <cc> task to create a library and link it dynamically, it does not produce a .LIB file to correspond w/ the resulting .DLL file. I don't think I'm doing anything out of the ordinary. Compiling in Debug mode, linking the library dynamically, and linking the runtime statically.
I run the shared-lib target of samples/cppunit.ant using msvc and got both the .lib and .dll. If you trying to use Cygwin or MinGW's gcc, there is an outstanding bug (941131) involving shared libraries.
I don't recall a specific fix for this issue, but quite a few bugs were fixed in the last week, so please use a fresh build cpptasks (available from http://gump.apache.org\) until I've had a chance to prepare a release.
If you are using msvc and still get the problem after updating cpptasks.jar, try building samples/cppunit.ant. Download and unzip cppunit-1.9.14 from http://cppunit.sf.net, copy samples/cppunit.ant to its base directory as build.xml and then run "ant -verbose -Dcompiler=msvc" and see if there is a successful build and a lib file.
Thanks for the suggestions.
I'm using MSVC natively (ie. no Cygwin or MinGW).
I'll try a fresh cpptask build along w/ looking into the sample.
I am not able to build the cppunit sample as I don't have cpp unit on my machine.
So I created a very simple project that demonstrates the problem on my machine.
Can I attach files in the forums or should I open a bug entry?
You can download cppunit from http://prdownloads.sourceforge.net/cppunit/cppunit-1.9.14.tar.gz?download. I would appreciate if you would try that since it would give us a common reference point. If you still thing there is a problem, log a bug but I will not be able to analyze it for a few days.
cppunit built fine on my system, and generated DLLs and LIBs. I duplicated the link command from cppunit to my project but it still doesn't generate a .LIB. I'm not very familiar w/ MS's linker, but I suspect from ordeal that the linker determines whether to generate a .LIB internally.
Unfortunately, the cppunit build file is too large to help in tracking down the issue.
I will open a bug entry w/ my simplified test case (just a class equivalent of "hello, world").
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.