Using \MDd and \MTd in the same visual studio solution? - c++

I have a large preexisting code base depending on many external libraries which all uses \MTd as the runtime setting. This code base is stable and well tested in this configuration.I would prefer to keep it as is.
I am attempting to integrate a new external library into the code base (incase it matters it is the Casablanca REST SDK) however I have just discovered it appears to need to be used with the \MDd setting. I was getting some strange untrackable bug deep in std:shared_ptr when I discovered this problem. When I changed my isolated project to use \MDd casablanca worked much better.
Visual studio does not appear to allow me to have different settings it appears to be either all or nothing in one solution?
Does anyone know of a good work around for this situation? Any suggestions? I'm not even sure where to focus my attention?
1) Can I fake Visual studio out and use both? and if so should I actually do that?
2) Or should I attempt to get a working static library of casablanca? It does not appear possible on the disscussion forum?
3) Or should I just bite the bullet and move the entire solution to \MDd?
4) Lastly, should I just cut my loses and try a different client server framework? A quick search showed for a windows c++ client server solution I could use Boost Asio, Google Client API, WinSock?
This is my first client server implementation and opinions are very welcome.

We actually moved the entire code base to link dynamically. There were other libraries causing some concerns and this seemed like a good time to migrate the code base. Problem solved, at least for now. Thanks for the feedback.

Related

Creating C++ Soap Client in Visual Studio 2010

I am trying to connect to a Soap Web service. I am very familiar with C++ , but this is the first time I try anything related to the web. I would like to use visual studio. Can anyone explain how to do it?
Can anyone explain how to do it?
Some notes (this is not a complete list/howto, but more of a guideline):
First, you need to choose a SOAP client library for C++. The best out there (or not the best - that's debatable) seems to be gSOAP.
For gSOAP (the library I am familiar with):
Second, (with gSOAP) you can generate a code base particular to the SOAP endpoints you need to connect with.
Third, add a project in Visual Studio ("project A") that links against this generated code, and hides it's interface behind it's own (A's) interface. This is not mandatory, but it is good practice, ensuring that changes to the generated code, do not force you to recompile your entire code base.
DO NOT EDIT the generated code. That would ensure you can no longer regenerate it, or that when you regenerate it you will have to apply all your edits again. If you have any workaround or processing to be done on requests/responses, implement those in Project A.
Then, write your code based on your Project A.

Using JasperReports (JasperSoft Studio + JasperReports Library) with ColdFusion 9 Standard Edition

So this is my first time posting a question here. If I do it wrong, please, be gentle. :)
I'm trying to find a decent reporting solution at my company and it seems like JasperReports is one of the better (read: inexpensive) ways to go. They've got a newly revamped Eclipse-based banded report editor called JasperSoft Studio, and it looks really slick.
The problem I'm having is figuring out exactly what pieces I need in order to use this tool (or the files it creates) in my CF apps. After much Googling, I'm not really finding the answers I'm looking for... and what little information I do find is really pretty old.
Is anyone using JasperSoft Studio in combination with the JasperReports Library to do any on-the-fly PDF creation? We've come to a point on this particular application where cfdocument just isn't cutting it.
The things I know are:
CF is using a really (really, really) old version of JasperReports
under the hood to drive cfreport.
There is a way for me to override the really old version of
JasperReports so that CF will load the newest one.
Beyond that though, I'm not sure if it's just a matter of using JasperSoft Studio to create compiled JRXML files or (.jasper files, I'm not sure which) and then maybe just rename those to '.cfr' which cfreport knows how to deal with... or what?
If I look at the documentation for JasperReports Library it would seem that I need a lot more than just the JR Library and the JasperSoft Studio to make all of this work... but it's just kind of unclear to me. Because the library is so flexible and can be used from lots of different types of systems I'm having trouble figuring out what I need for my certain set of circumstances.
Is anyone out there using JasperReports in their CF applications or does anyone have any experience setting up to use JasperReports with CF?
There seems to be precious little information on this topic. :(
Also, in case it comes up (as it did in a few of the much older posts I found on the internet) ColdFusion is written in Java so I DO have access to any underlying Java Classes that I might need.

Using Databases in C++ and Visual Studio 6

I already did some searching on stackoverflow and as far as I can see there are many ways to use databases in C++. Unfortunately at work my tools are pretty limited. I only get to use visual studio C++ 6 and don't even have boost (although I have learned to cope with that) - I assume that I can only use what is the standard distribution being delivered togather with VS C++ 6.
Now my code generates a lot of data and I would like to store some of it in a simple databse (like an MS Access db). What tools might I be able to use?
My alternative approauch would be to create a database-like object via a struct and vectors/arrays.
I also have office 2010 installed - perhaps I could somehow use Access?
Computation-speed also plays a role - the faster the better.
Another important thing: my PC at work isn't an open client. Thus I can not install any new software. Downloading and moving files works. Basically I must be able to install the tool by just moving the files into a desired folder.
Please let me know if the question is confusing or insufficiently detailed I will do what i can to remedy the situation then.
Thnaks in advance for your help :)
Even though you said 'only standard tools', I'd still say, get SQLite. It ss a public domain software, i.e. no license whatsoever . You can download an 'amalgamation' - one .h file and one .c file and include it into your project. It should compile in VC6 no problem. Very easy to use, you will be up and running in 10 minutes.
It does exactly what you need - a DB in a single file, no servers, zero-setup, etc.
Well, Visual C++ 6 did include MFC which had a suite of classes for the creation and manipulation of databases, I'm fairly certain it would be possible to use these to create a database that is accessible from Access. Unfortunately Microsoft's online help doesn't seem to go back that far, but all the reference material you need should come with the VS 6. (In my opinion VS Help system was better back then anyways.)
On a side note, you could download an old version of boost that would work with VS6. I'm not sure what the last version of boost that supports VS6 is, my guess it's somewhere around 1.3x.
VC6 should work.
Can you use MFC's db objects? (DAO I think back then?).
If your app really generates a lot of data, you might want to look at MySql. I've run into size limitations in older Access tables. Unless it's an extraordinarily simple db, you probably don't want to brew your own (though it might be fun if you have a lot of time).
The key will be finding a driver/db combo that will work. I would install the GA (free) MySql, create a tiny db with 1 table and find the driver ("connector" in MySql terms) that will work. Maybe older ODBC driver?
Also, check out ConnectionStrings.com for info on getting connected to a particular database / driver.

GetWriterForMessage() not called in Monotouch - is there a workaround?

I have ported over some code from a Windows application to Monotouch.
It is using ASMX Web Services to talk to some API.
The code fails on Monotouch 5 because the method
System.Web.Services.Protocols.SoapHttpClientProtocol.GetWriterForMessage()
is never called.
I have seen that in Mono you will even get a NotImplementedExeption but not in Monotouch. It simply gets ignored.
I need to find a way around this. I have to add custom headers to make the solution work.
Any workarounds or maybe is there even a chance that this will be fixed soon?
(I also filed a bug report, but I'm asking here because I am desperately looking for a workaround).
EDIT:
I found kind of a workaround but it is very annoying to use.
In the auto generated reference file you will have to decorate each and every method with
[SoapHeader( "SessionKeyHeader", Direction = System.Web.Services.Protocols.SoapHeaderDirection.InOut )]
Then implement the custom soap header class but skip the GetXmlWriter() method.
A bug has been filed at Xamarin about this issue.

Deploying application question (C++)

Does someone know if there is a way to pack everything-application related into one (single) exe-file?
My product is fully written in C++, has a lot of external plugins (dll) and some external data packages. It should be accessible using the network and without installation (launch in one click).
Are there some tools to make something like virtual filesystem and unpack everything application-related to memory?
Or probably I have to somehow (manually) integrate all the dlls and the data? Is this possible?
Thank you
Try an .msi file, or ClickOnce deployment (assuming Windows, assuming at least VS 2005).
Edit: Based on a comment below, I don't know in general if you can do exactly what you are asking with an arbitary set of DLLs. You can include, say, Microsoft Foundation Classes statically rather than dynamically. But the distributor of a DLL may not want to allow complete incorporation into your code. Even if you could, you might be running against license agreements and the like.
Not sure if that's what you want but UPX is made to generate a single exe from an application made of several ones : http://upx.sourceforge.net/
However if you want a virtual folder system, maybe you just need to use PhysicsFS ? http://icculus.org/physfs/
Anyway your question is not really clear...